Deno Desktop

Hacker News Top Tools

Summary

Deno Desktop is a new feature in Deno 2.9 that turns any Deno project into a self-contained desktop application with small binaries, framework auto-detection, built-in auto-update, and cross-compilation support.

No content available
Original Article
View Cached Full Text

Cached at: 06/22/26, 07:31 AM

# Desktop apps Source: [https://docs.deno.com/runtime/desktop/](https://docs.deno.com/runtime/desktop/) `deno desktop`turns a Deno project \(anything from a single TypeScript file to a Next\.js app\) into a self\-contained desktop application\. The output is a redistributable binary that bundles your code, the Deno runtime, and a web rendering engine into one bundle per platform\. Coming in Deno 2\.9 `deno desktop`ships in Deno v2\.9\.0 and is not in a stable release yet\. To try it now, run`deno upgrade canary`to install the[`canary`](https://docs.deno.com/runtime/reference/cli/upgrade/)build\. The command, configuration keys, and TypeScript APIs may still change before the feature is stable\. ## Why`deno desktop`[Jump to heading](https://docs.deno.com/runtime/desktop/#why-deno-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\. `deno desktop`is opinionated about those tradeoffs: - **Small by default, full Node compatibility\.**The default WebView backend uses the operating system's own webview for small binaries, and you still have the entire npm ecosystem available through Deno's Node compat layer\. Opt into the bundled Chromium \(CEF\) backend when you need identical rendering across macOS, Windows, and Linux\. - **Framework auto\-detection\.**Point`deno desktop`at a Next\.js, Astro, Fresh, Remix, Nuxt, SvelteKit, SolidStart, TanStack Start, or Vite SSR project and it runs: the production server in release mode, the dev server with hot reload under`\-\-hmr`\. No code changes are required to take an existing web project to the desktop\. - **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 Deno 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[Jump to heading](https://docs.deno.com/runtime/desktop/#hello%2C-desktop) Create a one\-file desktop app: main\.ts ``` Deno.serve(() => new Response("<h1>Hello, desktop</h1>", { headers: { "content-type": "text/html" }, }) ); ``` The compiled binary opens a window pointed at a local HTTP server bound to your[`Deno\.serve\(\)`](https://docs.deno.com/api/deno/~/Deno.serve)handler\. Run it directly: \>\_ ``` ./main # macOS / Linux .\main.exe # Windows ``` [`Deno\.serve\(\)`](https://docs.deno.com/api/deno/~/Deno.serve)automatically binds to the address the webview navigates to, so you do not need to pass a port or hostname\. See[HTTP serving](https://docs.deno.com/runtime/desktop/serving/)for details\. ## What's in this section[Jump to heading](https://docs.deno.com/runtime/desktop/#what's-in-this-section) - [Configuration](https://docs.deno.com/runtime/desktop/configuration/): the`desktop`block in`deno\.json`\. - [Backends](https://docs.deno.com/runtime/desktop/backends/): CEF, webview, raw; how to choose\. - [HTTP serving](https://docs.deno.com/runtime/desktop/serving/):[`Deno\.serve\(\)`](https://docs.deno.com/api/deno/~/Deno.serve)integration and the serving model\. - [Frameworks](https://docs.deno.com/runtime/desktop/frameworks/): Next\.js, Astro, Fresh, Remix, Nuxt, SvelteKit, and others\. - [Windows](https://docs.deno.com/runtime/desktop/windows/):[`Deno\.BrowserWindow`](https://docs.deno.com/api/deno/~/Deno.BrowserWindow)lifecycle, multiple windows, events\. - [Bindings](https://docs.deno.com/runtime/desktop/bindings/): calling Deno code from the webview via`bindings\.<name\>\(\)`\. - [Menus](https://docs.deno.com/runtime/desktop/menus/): application and context menus\. - [Tray and dock](https://docs.deno.com/runtime/desktop/tray_and_dock/): system status icons and the macOS dock\. - [Dialogs](https://docs.deno.com/runtime/desktop/dialogs/):`prompt\(\)`,`alert\(\)`,`confirm\(\)`as native popups\. - [Notifications](https://docs.deno.com/runtime/desktop/notifications/): native OS notifications via the Web`Notification`API\. - [Hot module replacement](https://docs.deno.com/runtime/desktop/hmr/):`\-\-hmr`for framework and non\-framework apps\. - [DevTools](https://docs.deno.com/runtime/desktop/devtools/): unified DevTools attached to both the Deno runtime and the webview\. - [Auto\-update](https://docs.deno.com/runtime/desktop/auto_update/):[`Deno\.autoUpdate\(\)`](https://docs.deno.com/api/deno/~/Deno.autoUpdate), manifests, bsdiff, rollback\. - [Error reporting](https://docs.deno.com/runtime/desktop/error_reporting/): capturing uncaught exceptions and panics\. - [Distribution](https://docs.deno.com/runtime/desktop/distribution/): cross\-compilation, output formats, installers\. - [Comparison](https://docs.deno.com/runtime/desktop/comparison/): how`deno desktop`relates to Electron, Tauri, Electrobun, Dioxus\. - [`deno desktop`CLI reference](https://docs.deno.com/runtime/reference/cli/desktop/): the command, its flags, and the`deno\.json``desktop`schema\.

Similar Articles

Deno 2.8

Hacker News Top

Deno 2.8 is released, adding new subcommands: deno audit fix, deno bump-version, and deno ci for CI workflows.

I wish Deno would keep doing what it does best

Lobsters Hottest

A reflective article critiquing Deno's shift towards Node.js compatibility, arguing it dilutes its original streamlined, zero-config philosophy that made it compelling for developers.

Zero-native – Build native desktop apps with web UI

Hacker News Top

zero-native is a new framework that allows developers to build native desktop applications using web UI technologies and the Zig programming language. It emphasizes tiny binary sizes, fast rebuilds, and direct access to C libraries without heavy runtime overhead.

Devin Desktop

Product Hunt

Devin Desktop allows users to manage fleets of local and cloud AI agents from a single interface.