Backends
ende desktop runs your app on top of one of several web rendering engines.
--backend (or the desktop.backend field in ende.json) selects which engine
your app embeds. If you don't choose one, ende desktop uses the WebView
backend.
Available backends
CEF
ende desktop --backend cef main.ts
Bundled Chromium Embedded Framework. The same engine that powers Chrome,
Electron, and Slack. The framework ships inside your .app / app directory
under Contents/Frameworks/.
- Identical rendering on macOS, Windows, and Linux.
- Full web platform support, including modern CSS, ES modules, WebGPU, and WebRTC.
- Largest binary size (~150 MB for the framework alone).
- All Ende desktop features supported (DevTools, autoUpdate, tray, dock).
Choose CEF when consistent rendering across platforms matters, or when you need a feature only Chromium ships (e.g. WebGPU on Linux).
WebView (default)
ende desktop --backend webview main.ts
The operating system's own webview: WKWebView on macOS, WebView2 on Windows, WebKitGTK on Linux.
- Smaller app size (just your code + the backend shim).
- Rendering and feature support varies per platform and OS version.
- Some web features may be missing or behave differently (Web Audio variants, WebGPU availability, etc.).
- DevTools not available (the unified DevTools mux supports CEF only at this time).
Choose WebView when binary size is the primary concern and your UI sticks to broadly-supported web features.
Raw
ende desktop --backend raw main.ts
No web engine. Provides window management, input events, clipboard, and the
native API surface, but no webview and no bindings.<name>() proxy.
Ende.serve() still binds to the address in
ENDE_SERVE_ADDRESS (tcp:127.0.0.1:<port>), though no window loads it.
Useful for apps that draw their own UI (WebGPU, Skia, custom rendering) or as a
foundation for non-web desktop programs. Select it with --backend raw or the
desktop.backend field in ende.json. See
WebGPU rendering for a complete example of drawing
to a window on this backend.
Picking a backend
| Need | Best fit |
|---|---|
| Identical rendering everywhere | cef |
| Smallest possible binary | webview |
| WebGPU / cutting-edge web APIs on all platforms | cef |
| Custom 2D/3D rendering, no HTML | raw |
| Internal app on macOS, you control the OS version | webview |
Switching backends
The same app code (windows, bindings, events, JS execution) runs on CEF and WebView, but the page doesn't run in the same place on every backend:
| Backend | Page origin | Page storage (localStorage, IndexedDB) |
|---|---|---|
webview on macOS, Windows |
app://<host> |
Kept across launches |
webview on Linux |
http://127.0.0.1:<port> |
Empty on every launch |
cef |
http://127.0.0.1:<port> |
Empty on every launch |
raw |
none | none |
Code that builds URLs to the app's own pages, opens WebSockets, or relies on
cookies may need changes when you switch; see
HTTP serving for what differs on app://. <host>
is the app identifier,
lowercased. The
runtime's own localStorage (in your Ende code) is kept across launches on
every backend.
To switch, change the config or pass the flag:
{ "desktop": { "backend": "webview" } }ende desktop --backend webview main.ts
The raw backend has no webview, so any APIs that interact with web content
(navigation, bindings, executeJs, etc.) are unavailable when using it.
How backends are obtained
You do not build the rendering backend yourself. The Ende CLI downloads prebuilt
backend binaries automatically. Downloads are checksum-verified and cached under
<ende_dir>/.
The first build for a new backend / target downloads the archive (a few hundred megabytes for CEF). Subsequent builds use the cache.
Cross-compilation
--target and --all-targets work with any backend. The CLI downloads the
prebuilt backend archive matching the target triple, with no local engine
toolchain needed. See Distribution.