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.

Deno Deploy

In the summer of 2021, Deno Deploy released its first Beta version, a modern serverless cloud built from the ground up by the Deno team that allows users to very quickly deploy JavaScript, TypeScript, and WASM services to data centers around the world.

Optimizing the Deno Core

The Deno core provides the “opcalls” function (similar to syscalls, aka), which allows JavaScript to call the runtime(fs/net/url-parsing/…) function provided by Rust. Prior to the 1.9 release, developers grouped opcall values by using a mix of JSON and binary buffers.

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.

With this feature, the development team has reduced the overhead of common operations such as URL parsing by more than 3x and made Deno a mature and fast JavaScript runtime.

See the Deno 1.9 release notes for more information.

Native HTTP

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.

1
2
3
import { serve } from "https://deno.land/std@0.121.0/http/server.ts";
serve((_req) => new Response("Hello, world"), { port: 3000 });
console.log("Listening on http://localhost:3000");

MDN Compatibility Tables

Deno on MDN

In August 2021, Deno was added to the MDN compatibility tables.

sobyte

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

Node.js compatibility

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 tls and 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.

Deno 2

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.

click here for the original article.