Deno Land has launched Deno 2.3, the latest update to its JavaScript and TypeScript runtime, focusing on enhanced compilation capabilities and improved NPM package support. This release notably advances the deno compile
feature, allowing developers to create standalone binaries that now fully support Foreign Function Interface (FFI) and Node native add-ons. This means that compiled executables can seamlessly integrate native libraries or Node plugins, expanding the scope of what Deno applications can accomplish when packaged.
Another key improvement in Deno 2.3 is giving developers more control over the compilation process by enabling the exclusion of specific files from being embedded in the final binary. This refinement makes it easier to tailor standalone executables, reducing size or removing unnecessary components, which is crucial for distribution and deployment. The ability to compile entire projects into single binaries remains one of Deno’s standout features, simplifying deployment by eliminating the need to pre-install dependencies or the Deno runtime itself on target machines.
In addition to compilation enhancements, Deno 2.3 introduces a new boolean flag, Deno.build.standalone
, which detects whether the code is running inside a compiled, standalone binary. This flag opens up possibilities for runtime introspection, enabling developers to modify behavior based on whether their code is running in a bundled environment. Such flexibility can help improve error handling, feature toggling, or user messaging in different execution contexts.
Moreover, the update brings support for local NPM packages, making it easier for developers to work with and test NPM modules during development without publishing them. By managing a local node_modules
directory, developers can set "nodeModulesDir"
to either "auto"
or "manual"
, with the latter requiring explicit installation commands after updates. These changes streamline local development workflows, encouraging smoother integration between Deno projects and the vast NPM ecosystem. For those interested, upgrading to Deno 2.3 is straightforward via the command deno upgrade
.