Skip to main content
Deno 2 is finally here 🎉️
Learn more
Deno seeing a 2023 in the clouds

Deno in 2023

In 2023, Deno shifted into high gear with respect to Node/npm compatibility and performance work, while continuing to move towards our goal of radically simplifying web development. Here’s a summary of what changed in 2023:

Let’s dive deeper into the changes below.

Enhanced Compatibility with Node and npm

In a significant move toward ecosystem harmony, Deno expanded its capabilities in 2023 by incorporating built-in Node modules, such as node:fs and node:child_process, accessible through the node: specifier. This addition builds on the native npm support introduced in late 2022, using the npm: specifier, further bridging the gap between Deno and the Node ecosystem. As of now, Deno boasts partial or full support for 38 of the 42 Node built-in APIs, marking a substantial stride in compatibility.

To facilitate a smoother transition from Node to Deno, we introduced several new features:

These enhancements are particularly useful for developers looking to run existing Node projects in Deno without extensive modifications.

A notable advancement in the past year was the stabilization of the Node-API. This development eliminates the need for the --unstable flag when utilizing npm packages dependent on Node-API, thereby broadening the range of supported npm packages and streamlining the integration process.

Simpler, faster web server with Deno.serve()

We’ve significantly streamlined web server creation in Deno by introducing and stabilizing the Deno.serve() function, allowing developers to launch a server with minimal code:

Deno.serve((req) => new Response("Hello, world"));

This enhancement is part of our ongoing commitment to simplify development processes and reduce the need for extensive boilerplate code. The Deno.serve() function embodies this philosophy, enabling efficient and concise server setup.

Performance has seen substantial improvements through targeted optimizations in the core libraries and the event loop mechanism. In benchmark tests using a basic “Hello, world” server setup, Deno’s HTTP throughput has seen remarkable gains, nearly doubling since late 2023. When compared to a similar Node.js server, Deno now demonstrates a ~61% increase in throughput, alongside notable enhancements in tail latency and memory efficiency.

HTTP benchmark in requests per second

Run on bare metal 8 core, 64GB ram, Intel Xeon E-2378G with `wrk -d 10s`

These advancements are not limited to Deno-specific projects; they extend to modules and applications utilizing the node:http module, thanks to Deno.serve’s underlying architecture.

A key factor in these performance gains is the improved integration of Deno’s HTTP interfaces with the Hyper and Reqwest libraries. This integration has minimized unnecessary data allocation and duplication across different layers of the Deno runtime.

Furthermore, we’ve optimized the Deno event loop, responsible for managing asynchronous operations and resource monitoring, to reduce overhead and enhance the runtime’s overall efficiency. These collective improvements underscore our dedication to providing a robust, high-performance environment for web development.

More flexible deno.json

At Deno, we stand by the principle of zero-configuration programming, particularly valuing the simplicity of single-file programs, even for those written in TypeScript. Recognizing that larger projects often demand more sophisticated setups, we’ve continuously improved our optional deno.json configuration file to meet these complex needs without sacrificing ease of use:

  • Streamlined Configuration: We’ve transformed deno.json to double as an import map, effectively reducing the need for separate configuration files and simplifying project setups. Learn more about import maps.
  • Enhanced Formatting Options: deno fmt now supports semicolons, offering more flexibility in code styling to accommodate diverse developer preferences.
  • Node and npm Compatibility: Integration with package.json enhances compatibility, making it easier for projects to transition between Node and Deno environments. See how we improved compatibility.
  • Simplified Configuration Structure: We’ve flattened the deno.json structure, making it more intuitive and easier to navigate for developers. Discover the simpler structure.
  • Glob Support: The introduction of glob patterns in deno.json allows for more precise control over file and directory inclusion or exclusion in various operations such as formatting, linting, and testing. Explore glob support details.

These enhancements are part of our ongoing commitment to making Deno not only powerful and versatile for large-scale applications but also simple and accessible for smaller projects.

Smoother development experience with LSP

Deno’s Language Server Protocol (LSP) integration elevates the development experience within editors and IDEs, offering robust features like precise go-to-definition, comprehensive IntelliSense, and seamless code formatting for TypeScript projects. This year, we’ve dedicated significant effort to enhance the LSP, making coding in Deno smoother and more intuitive:

  • Extended Auto-Complete: Now includes support for npm: and node: specifiers, streamlining the use of Node modules within Deno.
  • VSCode Extension Activation: The Deno VSCode extension is now triggered automatically when a deno.json file is detected in your project, ensuring immediate access to Deno’s powerful tooling.
  • Intelligent Import Management: Imports in TypeScript and JavaScript files are now updated automatically when files are renamed, maintaining code consistency and reducing manual refactoring.
  • Efficient Document Pre-Loading: Ensures features like “find references” work seamlessly across all files in a project, enhancing code navigation and understanding.

To fully leverage these improvements, try the Deno extension for Visual Studio Code, designed to integrate these enhancements directly into your development workflow.

WebGPU

Deno has now integrated WebGPU, a cutting-edge technology that empowers developers to harness the power of GPU hardware directly with JavaScript. This high-performance, low-level interface is designed for a wide range of applications, from graphics rendering to data analysis, and machine learning, all within the familiar environment of web-standard JavaScript.

After a year of dedicated development, WebGPU is accessible in Deno behind the --unstable-webgpu flag, marking a significant milestone in expanding the capabilities of Deno applications. This feature is especially promising for developers looking to push the boundaries of what’s possible with JavaScript in areas requiring intense computational power.

We are also actively developing features to enable WebGPU for rendering in native GUI windows, further broadening the potential use cases for Deno developers. Stay updated on this feature’s progress.

To explore practical applications and see WebGPU in action within Deno, visit our WebGPU examples repository, which provides a variety of sample projects and code snippets.

Jupyter notebooks

Jupyter, the open source notebook tool, added support for JavaScript and TypeScript using Deno. This means data science, visualization, and more can all be done using modern JavaScript and TypeScript and web standards APIs.

Here’s an example of grabbing data with fetch and visualizing it with observablehq/plot:

A scatter plot in Jupyter notebooks using TypeScript with Deno

Jupyter support has also enabled building generative AI/ML models using JavaScript and TypeScript, as Andrew Ng and DeepLearning.AI have developed a generative AI course on building LLM Apps with LangChain.js that uses Deno.

Notable open source rust crates

Deno’s surface area touches a wide range of open source projects, which we eagerly contribute to in order to expand Deno’s feature set and optimize performance. This year, we released a few Rust crates that developers might find useful independently of Deno itself:

  • rustls-tokio-stream a Rust crate that replaces tokio-rustls adding more advanced features like supporting duplex I/O via tokio::io::split. Critically it does not require either read or write polling to perform handshakes.
  • fastwebsockets is a minimal, fast WebSocket server implementation that sits behind Deno’s WebSocket implementation. It completely passes the Autobahn TestSuite and fuzzed with LLVM’s libfuzzer. You can use it as a raw websocket frame parser and deal with spec compliance yourself, or you can use it as a full-fledged websocket server.
  • monch is a parser inspired by nom, but specifically for strings and with some additional combinators we use in Deno. It backs deno_task_shell.
  • deno_task_shell is a cross platform shell implementation that helps deno task run across windows and unix. Think of it as a more advanced version of the common Node.js utility cross-env.

Fresh

We continued to make Fresh, Deno’s modern full stack web framework that sends zero client-side JavaScript by default, easier to use and more performant.

We’ve got a lot planned for Fresh in 2024, such as view transitions, hot module reloading, and faster JSX transforms.

Expanding Deno’s cloud business

Though we’ve covered the big updates from our open source projects, the overall Deno picture would be incomplete without mentioning developments on the commercial side.

Though Deno Subhosting has been around for a while powering Netlify’s edge functions and Deco.cx’s customer’s e-commerce stores, this year we made it self-service so that anyone can deploy and run their user’s code programmatically via our Subhosting API for free. It’s built to run third-party, untrusted code securely, as it’s designed from the ground up for maximum tenant isolation. (Not sure what to use Deno Subhosting API for? Check out this tutorial on how to build your own cloud IDE.)

We’re made strides towards our vision of radically simplifying web development with the launch of cloud primitives: Deno KV, Queues, and Cron. They’re built right into the runtime so you can get setup without juggling API keys or futzing with config:

const kv = await Deno.openKv();

These cloud primitives seamlessly become globally distributed services when you use Deno Deploy, optimizing your servers and applications for performance.

We’ve also broadened access to Deno KV by turning it into its own open sourced binary, added support to remotely connect to any Deno KV instance, made it accessible in Node/npm via our official Deno KV npm module, as well as adding support for continuous replication with point-in-time recovery to S3 and GCS.

We’ve got some big plans to simplify cloud development even further with more features and new primitives, so stay tuned.

Deno 2 👀

We’re preparing for Deno 2, which will offer improved compatibility with Node and npm, by providing a migration guide to ensure a smooth transition. Alongside an improved runtime, we also have some exciting announcements around managing and optimizing dependencies for your projects. Stay tuned in the coming weeks for a more detailed roadmap of what’s to come. If you want a sneak peak - look here.



Don’t miss any updates! Follow us on Twitter.