Deno 2.9 has been released, designed for isolated execution of server and desktop applications in JavaScript and TypeScript using the V8 engine, which is used in Chromium-based browsers. The project is led by Ryan Dahl, the creator of Node.js, aiming to provide a more secure environment and address design flaws in Node.js architecture. To enhance security, the wrapper around the V8 engine is written in Rust, and for handling requests in a non-blocking manner, the Tokio platform is used. The project's code is distributed under the MIT license. Builds are prepared for Linux, Windows, and macOS.
The new version is notable for the implementation of the experimental Deno Desktop toolkit, allowing the creation of user applications with graphical interfaces built using web technologies, similar to the Electron platform. The logic and interface of the application are defined in JavaScript or TypeScript using standard web frameworks, and the functionality is organized using a browser engine. The application is delivered as a self-contained executable file and interacts with users just like traditional GUI programs.
Deno Desktop offers backends for operation over two browser engines—the OS-provided WebView and the integrated CEF (Chromium Embedded Framework). The WebView-based backend reduces the size of executable files by operating over the system's browser engine WebView2 in Windows and WebKit in macOS and Linux, while the CEF backend allows for consistent rendering of the interface across Linux, macOS, and Windows, albeit at the cost of significantly larger executable files.
The size of the executable file for the test application using WebView is estimated at 40 MB, while using CEF results in 150 MB. For comparison, this figure for Electron is 100 MB, for Electrobun it is 61 MB, and for Tauri, it ranges from 2 to 10 MB (Electron uses an embedded CEF, while Electrobun and Tauri use the system's WebView). A mechanism for shared use of a common CEF engine across different applications is in development, which will help reduce the size of executable files.
Deno Desktop offers full compatibility with Node.js, the NPM ecosystem, and web frameworks such as Next.js, Astro, Fresh, Remix, Nuxt, SvelteKit, SolidStart, TanStack Start, and Vite SSR. It provides an API for accessing native desktop APIs, allowing control over window size, position, and visibility, as well as creating menus, attaching custom handlers, setting system tray and panel icons, and displaying native OS dialogs. It facilitates the assembly of web applications into desktop programs without altering their code, along with automatic detection of used web frameworks and cross-compilation on a single system for Linux x64/arm64, Windows x64, and macOS x64/arm64. For Linux, it can generate packages in AppImage, deb, and rpm formats.
Unlike Electron, Electrobun, and Tauri, Deno Desktop uses a multithreaded model for CEF or a group process-based model for WebView, allowing interaction between the backend and the graphical interface code through channels within a single process, rather than a multiprocess execution model with IPC based on sockets. It features a built-in mechanism for checking and automatically installing updates that conserves bandwidth by downloading only data changed since the previous version (using binary patches based on bsdiff) and supports rolling back to the previous version in case of failure upon launching a new version.
Among other innovations in Deno 2.9:
- Support for direct reading of lock files in the 'deno install' command to simplify migration to Deno from npm, pnpm, yarn, and Bun.
- Support for importing CSS modules.
- Implementation of compatibility with Node.js platform 26.
- New commands 'deno link', 'deno unlink', and 'deno list'.
- Support for the Web Locks API to apply locks on resources.
- A default 24-hour delay (min-release-age=24h) before installing new versions of dependencies to safeguard against attacks through dependency compromise.
- Reduced startup time (~2x), decreased memory consumption (~2.2x), and enhanced throughput for HTTP operations (~1.2x).

Source: opennet.ru

