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.json manifest and bsdiff patches; the runtime polls, applies, and rolls back automatically on failed launches.

Hello, desktop

Create a one-file desktop app:

main.ts
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