Desktop apps
ende desktop turns an Ende project (anything from a single TypeScript file to
a full web app) into a self-contained desktop application. The output is a
redistributable binary that bundles your code, the Ende runtime, and a web
rendering engine into one bundle per platform.
Why ende desktop
Web technology is the most widely-known UI toolkit in the world. Desktop apps built on web stacks (Electron, Tauri, Electrobun) take advantage of that, but each has tradeoffs you have to live with: huge binaries, missing platform support, no JavaScript ecosystem, no built-in update story, no framework integration.
ende desktop is opinionated about those tradeoffs:
- Small by default. The default WebView backend uses the operating system's own webview for small binaries. Opt into the bundled Chromium (CEF) backend when you need identical rendering across macOS, Windows, and Linux.
- In-process bindings instead of IPC. Backend and UI communication goes through in-process channels, not socket-based IPC. Values are still encoded as they cross the call boundary, but there is no cross-process round-trip between your Ende code and the webview.
- Cross-compile from one machine. The same machine can build for macOS, Windows, and Linux. Backends are downloaded as needed, not built locally.
- Built-in binary-diff auto-update. Ship a single
latest.jsonmanifest and bsdiff patches; the runtime polls, applies, and rolls back automatically on failed launches.
Hello, desktop
Create a one-file desktop app:
Ende.serve(() =>
new Response("<h1>Hello, desktop</h1>", {
headers: { "content-type": "text/html" }
})
);ende desktop main.ts
The compiled binary opens a window pointed at a local HTTP server bound to your
Ende.serve() handler. Run it directly:
./main # macOS / Linux
.\main.exe # Windows
Ende.serve() automatically binds to the address the
webview navigates to, so you do not need to pass a port or hostname. See
HTTP serving for details.
A complete example
For a complete, real-world app built with ende desktop, see
denidian: an Obsidian-style
note-taking app with Markdown notes, [[wikilink]] crosslinking, and a
force-directed graph view. It is deliberately small — a single Ende HTTP server
plus a vanilla HTML/CSS/JS frontend — and covers window management via
Ende.BrowserWindow, application menus,
--hmr development, and packaging for distribution.
What's in this section
- Configuration: the
desktopblock inende.json. - Backends: CEF, webview, raw; how to choose.
- HTTP serving:
Ende.serve()integration and the serving model. - Windows:
Ende.BrowserWindowlifecycle, multiple windows, events. - WebGPU rendering: draw to a native window with WebGPU on the raw backend.
- Bindings: calling Ende code from the webview via
bindings.<name>(). - Menus: application and context menus.
- Tray and dock: system status icons and the macOS dock.
- Dialogs:
prompt(),alert(),confirm()as native popups. - Notifications: native OS notifications via
the Web
NotificationAPI. - Hot module replacement:
--hmrfor framework and non-framework apps. - DevTools: unified DevTools attached to both the Ende runtime and the webview.
- Auto-update:
Ende.autoUpdate(), manifests, bsdiff, rollback. - Error reporting: capturing uncaught exceptions and panics.
- Distribution: cross-compilation, output formats, installers.
- Comparison: how
ende desktoprelates to Electron, Tauri, Electrobun, Dioxus. ende desktopCLI reference: the command, its flags, and theende.jsondesktopschema.