Deno 1.0: Node.js Makers Have New JavaScript Runtime For TypeScript Programming Language

The makers of the widely used JavaScript server-side runtime, Node.js, have released Deno 1.0, a new runtime for JavaScript and TypeScript that addresses "design mistakes" in Node.js.

The Deno JavaScript project has been under development by Node.js creator Ryan Dahl for the past two years and his team of contributors has now released Deno 1.0, which could become just as important for JavaScript developers as Node.js.

JavaScript is one of the most widely used programming languages, and it's employed on every device with a web browser. Just like Node.js or Node, the Deno runtime is for executing JavaScript outside a web browser. 

However, unlike Node.js, Deno offers first-class support for Microsoft's increasingly popular Typescript, a superset of JavaScript designed for large projects. 

Deno is based on Google's Chromium V8 JavaScript engine and written in programming language Rust as opposed to C++ for Node. 

Besides fixing problems with Node.js, Dahl also wanted Deno to cater for JavaScript being a very different language today than it was in 2009, when he designed Node. Additionally, because of Node's wide use, Node has become difficult to update. 

"With the changing JavaScript language, and new additions like TypeScript, building Node projects can become an arduous endeavor, involving managing build systems and other heavy-handed tooling that takes away from the fun of dynamic language scripting," writes Dahl in a blogpost co-authored by fellow Deno developers Bert Belder and Bartek Iwańczuk. 

"Furthermore the mechanism for linking to external libraries is fundamentally centralized through the NPM repository, which is not in line with the ideals of the web," he adds, referring to Node's NPM packages.  

The Deno core is written in Rust, and Deno 1.0's main component is the Deno command line interface (CLI). 

Dahl says Deno is not a monolithic program, but rather a collection of Rust "crates" – packages or software libraries – that allow integration at different layers. For example, the Deno core crate is the "very bare bones" of Deno, while the rusty_v8 crate provides Rust bindings to V8's C++ application programming interface (API). 

"The crate provides binaries that are built in GitHub Actions CI, but it also allows users to compile V8 from scratch and adjust its many build configurations," Dahl writes.

"All the V8 source code is distributed in the crate itself. Finally rusty_v8 attempts to be a safe interface. It's not yet 100% safe, but we're getting close. Being able to interact with a VM as complex as V8 in a safe way is quite amazing and has allowed us to discover many difficult bugs in Deno itself."

Dahl also stresses that Deno is not a fork of Node, but a completely new implementation, albeit with similar goals to Node. It's also not, in general, compatible with NPM. However Dahl expects Deno will eventually be able to run more Node programs out of the box.

Deno's performance on web server is about equal to Node, according to Dahl, but Deno has better latency than Node. 

"A hello-world Deno HTTP server does about 25k requests per second with a max latency of 1.3 milliseconds. A comparable Node program does 34k requests per second with a rather erratic max latency between 2 and 300 milliseconds," he notes.

RECENT NEWS

Harnessing AI To Combat Cyber Risk: Strategies For Financial Institutions

Cyber threats pose an ever-present danger to financial institutions, requiring robust strategies to mitigate risks effec... Read more

Adaptation And Innovation: Revolut's Response To Banking License Delay Through Advertising Sales Push

As Revolut eagerly awaits the acquisition of its banking license, the fintech giant has demonstrated remarkable adaptabi... Read more

Riding The Wave: The Evolution Of Fintech Investment Strategies

The fintech industry has experienced unprecedented growth in recent years, captivating the attention of investors worldw... Read more

How Fintech Is Revolutionizing Traditional Banking

How fintech is revolutionizing traditional banking is a topic that is garnering positive and immense discourse within th... Read more

Blockchain And Its Impact On Fintech Industry

Blockchain and its impact on Fintech Industry has become a hot topic in the current digital era. The amalgamation of blo... Read more

The Rise Of Fintech In The Digital Era

In the heart of the digital revolution, we've observed a term termed as "fintech" creating a substantial and transformat... Read more