Technology
Deno project is going to add cross-platform desktop apps in next major update
Key Points
The next major release of Deno, a JavaScript/TypeScript runtime, will include new commands to build cross-platform desktop applications using web technology. Deno desktop will compile an application from a plain TypeScript file or from frameworks such as Next.js, Astro, Deno Fresh, TanStack Start or Vite SSR (server-side rendering). A distinctive feature is that the native WebView is used by default, rather than bundling the Chromium Embedded Framework (CEF).
The next major release of Deno, a JavaScript/TypeScript runtime, will include new commands to build cross-platform desktop applications using web technology. Deno desktop will compile an application from a plain TypeScript file or from frameworks such as Next.js, Astro, Deno Fresh, TanStack Start or Vite SSR (server-side rendering). A distinctive feature is that the native WebView is used by default, rather than bundling the Chromium Embedded Framework (CEF). The advantage is much smaller applications. In our quick test, a compiled application using WebView on macOS was around 68.5MB, whereas using CEF, which is also an option, the size was 308.9MB (though the docs suggest 150MB as typical) and startup was slower. The trade-off is that CEF provides all the features of Chromium and consistent rendering across platforms. Without CEF, it is a challenge to ensure the WebView on all supported platforms will work as expected, particularly since users may install on older machines with out-of-date native web browsers. This is a particular problem with macOS and Safari. Deno desktop has a further option, called Raw, which has no web engine. Developers get window management and can draw a user interface with WebGPU, the Skia library, or their own custom rendering. A Deno desktop application, other than one using Raw, includes a local web server, which means that developers can easily port web applications. According to the docs, the cost of "a single network hop" is negligible in most cases. That said, there is also an option for in-process binding, which exposes a Deno function directly to the WebView or CEF. Deno Desktop supports native menus and context menus (right-click), native dialogs for alerts and confirmations, and notifications via the Web Notifications API, which appear as native notifications. File picker dialogs are not yet supported, other than by the web file input type, or drag and drop. There is no separate clipboard API yet. Mobile applications are not yet supported, though it is planned. There are plenty of existing options for building desktop applications with web technology, including the popular Electron used by many well-known applications but sometimes disliked for its high resource usage. The Deno desktop docs include a comparison with Electron, Electrobun, Tauri, and Dioxus. Deno desktop looks well thought-out, though it is not yet stable, and we noticed issues such as the window close button not working in macOS using WebView, as well as friction trying to get it working with some web frameworks. The broader question, perhaps, is whether this will help the Deno project gain market share. It began as an effort to improve on Node.js, and has been somewhat upstaged by the Bun project now owned by Anthropic. One of the problems for Deno is that the Node.js ecosystem is so entrenched that the project has had to retrofit Node.js compatibility, diverting engineering time from other potential features. One Deno user, Hong Minhee, posted that they liked Deno initially because it avoided the pain of Node.js. "No configuration files, no node_modules, no agonizing over which package manager to use." Now though, "Deno is spending more and more of its energy catching up to Node.js," while on the other side of the camp, Node.js has added features such as TypeScript compatibility. "Why didn't Deno hold the course?" they ask. The quick answer is that the pull of the established Node.js ecosystem was too strong. Deno desktop looks promising and could provide another reason to use Deno if it works well, though there is also a risk of further diluting the resource available for the core runtime.®