Lune
Build native desktop apps with Crystal and a web frontend.
Lune wraps a native WebView and lets you call Crystal code from JavaScript over a typed bridge — no servers, no IPC boilerplate. Think Wails or Tauri, but for Crystal.
v0.x notice: Both the library and CLI APIs may change before 1.0. If you use this now, expect occasional breaking changes.
Documentation
Full docs live at the project website (run npm run docs:dev locally from the repo):
- Getting Started
- How It Works
- Bindings
- Assets & Build
- Error Handling
- Events
- TypeScript
- Window Configuration
- CLI Reference
- Configuration (lune.yml)
Quick start
lune init my_app
cd my_app
lune dev
Pre-built CLI binaries are on the releases page. Or build from source: make setup && make deploy.
Platform support
| Platform | Dev | Build | |----------|-----|-------| | macOS | ✅ | ✅ | | Linux | ✅ | ✅ | | Windows | ⚠️ requires manual setup | ⚠️ untested |
Windows
The naqvis/webview postinstall script is Unix-only. Before running shards install, manually set up WebView2:
- Download the WebView2 NuGet package and extract
build/native/include/WebView2.hintolib/webview/ext/. - Build
webview.dllandwebview.libwith MSVCcl.exeagainst that header. - Copy
webview.dll,webview.lib, andWebView2Loader.dllinto a directory onCRYSTAL_LIBRARY_PATH. - Run
shards install --skip-postinstall.
The webview event loop must own a dedicated OS thread on Windows. Lune uses Fiber::ExecutionContext::Isolated for this. Untested on real hardware — feedback welcome.
Development
make setup # shards install + npm install
make test # crystal spec
make deploy # build release binary → /usr/local/bin/lune
Contributing
- Fork it (https://github.com/aristorap/lune/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Add specs for your changes (
crystal spec) - Commit and push and open a Pull Request
Contributors
- Aristotelis Rapai — creator and maintainer
License
MIT