After two years of development, Deno finally reached version 1.0 in May 2020. According to its official web site, Deno is a secure runtime for JavaScript and Typescript. Sounds like Node.js? Yes, Deno is created by the original developer of Node.js, Ryan Dahl, to address what he called “10 things I regret about Node.js”. Deno runs JavaScript or TypeScript or WebAssembly applications on the underlying V8 engine, just like Node.js does. For application developers, there are several noticeable differences between Deno and Node.js.
Unlike the modular binaries in Node.js, Deno is a single binary application. It doesn't make use of complex dependency management solutions like the NPM. Instead, developers declare dependencies in source code using direct URLs. There are already over 500 third-party Deno modules available. It would be interesting to see whether this approach can scale to enterprise applications. As a result, Deno is in general not compatible with NPM packages written for Node.js. However, porting should be fairly easy as they use the same family of programming languages and frameworks. Deno supports many Node.js built-in library objects already. Also in contrast to Node.js, the Deno runtime is secure by default. If the application needs to access the file system or network, the developer will need to declare that explicitly.
In terms of programming API, Deno makes TypeScript a first-class citizen. The Deno runtime API makes extensive use of the TypeScript/JavaScript Promises and the async/await API, which was not available when Node.js was designed. In addition to TypeScript and JavaScript, Deno applications can load and execute WebAssembly bytecode programs. For example, the Sqlite module in Deno is compiled from C++ to WebAssembly. Furthermore, developers could extend Deno with Rust. That allows the Rust dependency/package manage system, Cargo, to be used to manage Deno plugins and add-ons.
Under the hood, Deno uses Rust, as opposed to C/C++ in Node.js, to access the underlying V8 engine. It uses the Rust’s Tokio crate (library), as opposed to libuv, to support high concurrency in web applications.
Even though Deno has just reached v1.0, it is already supported by notable players in the industry, like major cloud providers such as AWS Lambda, Azure Functions, and Google Cloud Run. Brian Leroux of Begin.com tested Deno on AWS and it started in as little as six seconds. JetBrain’s WebStorm, a popular IDE for JavaScript, announced its support for Deno, too.
However, while optimistic about Deno’s future, most developers also believe that Node.js is here to stay. It will be very difficult for Deno to overtake Node.js in the near future due to the large ecosystem and enterprise applications around Node.js.
Deno ... is just the culmination of around two years of work on an idea. It hasn’t been tried and tested in production systems yet. ... And until it does, it’ll just be a toy for early adopters to play with. — Fernando Doglio, Node.js expert and book author
In the three weeks after Deno’s v1.0 release, the Deno team has already made five minor releases mostly for bug fixes. The project’s next release, v1.1, has planned improvements to the CLI, public API, and its Rust plugin system. To learn more about Deno’s future plans, checkout Ryan Dahl’s upcoming presentation at the free OpenJS World conference.
Deno is open-source software available under the MIT license. Contributions are encouraged via the Deno Project and should follow the Deno contribution guideline.