← Back to news

Deno Desktop

docs.deno.com|866 points|330 comments|by GeneralMaximus|Jun 22, 2026

Deno Desktop: Bringing the Web to the Desktop

deno desktop is a powerful utility that converts any Deno project—ranging from a solitary TypeScript file to a complex Next.js application—into a standalone, self-contained desktop program.

The result is a redistributable binary that packages your source code, the Deno runtime, and a web-based rendering engine into a single platform-specific bundle.

⚠️ Release Status

The deno desktop feature is scheduled for release in Deno v2.9.0 and is currently stable experimental.

  • Stable Release (Pending v2.9.0)
  • Available in Canary

To experiment with it now, execute: deno upgrade canary

Note: Because this is not yet stable, the CLI commands, configuration keys, and TypeScript APIs are subject to change.


Why Choose Deno Desktop?

Web technologies represent the most ubiquitous UI toolkit globally. While other frameworks like Electron, Tauri, or Electrobun leverage this, they often force developers to accept specific compromises.

Comparison of Trade-offs

FeatureTraditional Web-StacksDeno Desktop Approach
Binary SizeOften bloated/hugeSmall by default (via OS WebView)
EcosystemVaries (some lack JS/Node)Full Node compatibility via Deno
ConsistencyHigh (Bundled Chrome)Optional (OS WebView \rightarrow CEF)
UpdatesManual or complexBuilt-in latest.json & bsdiff
IntegrationFramework-specificNative support for SSR frameworks

Key Architectural Advantages

  1. Rendering Flexibility:
    • Default: Uses the native OS webview to keep binaries lightweight.
    • Opt-in: Use the bundled Chromium (CEF) backend when you require pixel-perfect rendering across Windows, macOS, and Linux.
  2. Framework Agnostic: It integrates seamlessly with:
    • Next.js, Astro, Fresh, Remix
    • Nuxt, SvelteKit, SolidStart, TanStack Start
    • Any Vite SSR project
    • Mode: Runs the production server in release mode or the dev server with --hmr for hot reloading.
  3. Efficient Communication: Unlike traditional models, communication between the backend and UI happens via in-process channels rather than socket-based IPC.

Communication Flow

While values are still encoded when crossing the boundary, the latency is minimized because there is no cross-process round-trip.

Mathematically, the latency Δt\Delta t can be represented as: ΔtDenoDesktopΔtSocketIPC\Delta t_{DenoDesktop} \ll \Delta t_{SocketIPC}

  1. Seamless Updates: Deployment is simplified by shipping a latest.json manifest and bsdiff patches. The runtime handles the polling, application, and automatic rollback if a launch fails.

Hello, Desktop: Quick Start

You can create a functional desktop application with a single file.

File: main.ts

Deno.serve(() => {
  return new Response("<h1>Hello, desktop</h1>", { 
    headers: { "content-type": "text/html" } 
  });
});

Execution: deno desktop main.ts

Deno Desktop Concept (Conceptual Image)

The resulting binary (e.g., main.exe on Windows) opens a window that points to a local HTTP server. Because Deno.serve() automatically binds to the address the webview is navigating toward, you don't need to manually specify a hostname or port.


Documentation Roadmap

The following sections provide deeper dives into the deno desktop ecosystem:

  • Configuration: Managing the desktop block within deno.json.
  • HTTP Serving: Understanding the Deno.serve() integration model.
  • Frameworks: Specifics for Next.js, Astro, Fresh, and others.
  • Windows Integration: Managing Deno.BrowserWindow lifecycles and events.
  • Notifications: Utilizing the native OS Web Notification API.
  • Hot Module Replacement: Using --hmr for rapid development.
  • DevTools: Accessing unified tools for both the runtime and webview.
  • Auto-update: Implementing Deno.autoUpdate(), manifests, and bsdiff.
  • Distribution: Guidance on cross-compilation and installers.
  • Comparison: A detailed look at Deno Desktop vs. Electron, Tauri, Electrobun, and Dioxus.
  • CLI Reference: Full schema for deno.json and command-line flags.