The official Deno blog review gives an overview of the major events and important features added to the project in 2021. The blog mentions that Deno has released 44 versions in 2021 (11 minor updates and 33 patch updates), adding many important features, fixing numerous bugs, and optimizing performance.
Optimizing the Deno Core
The efficiency of the op-layer was a key factor in determining the overall performance of the runtime. opcalls, which used to have 4000ns of overhead per call, have been reduced to about 1% of their original size, taking only 40ns per call. most of these efficiency gains are due to serde_v8, which was designed and delivered by the development team in v1.9 to maximize efficient bijection between Rust and V8 values. The development team maximized efficient bijection between Rust and V8 values in v1.9.
In Deno 1.9, the development team released native HTTP server bindings, a feature that was later brought to a stable state in Deno 1.13. High-performance
hyper HTTP servers can be created with just a few lines of code using these bindings, and since these bindings are built on
hyper, they provide great throughput.
MDN Compatibility Tables
In August 2021, Deno was added to the MDN compatibility tables.
Foreign Function Interface
In Deno v1.13, the development team replaced the unstable The development team has replaced the unstable plug-in system with the new Foreign Function Interface API. Although FFI is still unstable, this is a significant improvement.
The native plug-in system prior to 1.13 allowed the distribution of dynamic libraries written in Rust. Due to the instability of the Rust ABI and the restriction of API authors to a single language, the Deno team decided to replace this system with a generic FFI API. This API allows developers to write “extensions” for Deno runtime in any language that uses the C calling convention.
Some interesting projects using the FFI API have already been born, demonstrating the power of the FFI API.
Slack & Next Generation Platform
In November 2021, Slack announced its next-generation development platform based on Deno, which the Deno team says provides a solid foundation for Deno Deploy’s “isolation as a service” for
- Modern edge hosting
- User extensible platform (bots, plugins, apps, etc…)
- Low-code solutions
In Q4 2021, the Deno team started working on delivering best-in-class Node.js compatibility, allowing Deno to run applications and libraries developed for Node.js (NPM packages) directly in Deno. In Deno v1.15, the team released the first preview of “compat mode”. Although this feature is still unstable, it can be enabled using the
--compat flag. Most of the work involves providing polyfills in std/node.
Some key modules such as
zlib are still incomplete, but in their current form it is still possible to run non-trivial types of applications. The team has stated that the goal is to release the first iteration for all users in the coming months.
For Deno 2, the team says it will address a number of minor API changes, as well as optimizing Deno’s workflow. They will soon release a roadmap for Deno 2, which they hope to launch in the first half of this year. deno will focus on providing better NPM eco-compatibility, better DX for common workflows, and exploring alternative package management solutions.