1.3 About Deno


Deno is a simple, modern, and secure runtime for JavaScript and TypeScript. It supports Typescript out of the box. Deno is written in Rust, a modern systems programming language. Deno uses Google's ultra-fast V8 engine to run the Javascript code. Google's V8 or simply V8 supports only Javascript, so Deno converts Typescript to Javascript before executing it on V8. Deno uses the TSC/SWC compiler to convert from Typescript to Javascript. SWC compiler is ultra-fast as it is also written in Rust. TSC compiler is written in Javascript and is quite slow compared to SWC.

Unique features of Deno

Deno has some unique features when compared to Node.js. Most of these unique features come from the regrets listed in the previous section.


Deno is secure by default. Unless enabled, there is no file, network, or environment access by default. All the accesses need to be enabled explicitly. For example, through file access permissions, Deno can be restricted to read and write only to certain directories and/or files. Except for the allowed ones, Deno will restrict access to all other directories and/or files. Similarly, network access could be restricted to certain IPs, domains, etc. Environment access is also controlled through permissions.
This sandboxing makes Deno very secure. A Deno process doesn't have all the permissions that the running user has. All the accesses can be enabled globally or granularly. It is like running Deno in a container without having a container.

Typescript support

Deno supports Typescript out of the box. Unlike Node.js, there is no need to install or use any external third party libraries. Deno has built-in support for Typescript through the TSC/SWC compiler. Though, it's important to note that, Typescript needs to get converted to Javascript before it can run on the V8 engine as V8 still doesn't understand Typescript. Conversion from Typescript to Javascript happens at startup unless there are dynamic imports.

Single Executable

Deno ships as a single executable. Although Deno is a single executable, it contains the entire development toolchain. The single executable includes:
  • Core engine that runs TS/JS code
  • Upgrade manager
  • Formatter
  • Debugger/inspector
  • Test framework
  • etc.
All the basic services useful for developers are included in the single executable. There is no need to install any package manager or any other tools mentioned above. When Deno is installed, it gets downloaded and installed as a single executable. There are no dependencies to download and install. This makes it easy for dev and DevOps.

Third-party packages

This one came directly from Ryna's biggest regrets. Node.js supported a private package manager NPM, and it became an integral part of the Node.js ecosystem. Unlike Node.js, Deno doesn't require any package manager to host third-party packages. This doesn't mean that Deno doesn't support third-party packages. It does, but all the third-party packages can be used as standard ES modules which get imported through HTTP or could also be local. They can be hosted anywhere like GitHub, enterprise web server, personal web server, or local file system. Deno downloads them in a cache before using them.

Top-level await

Top-level await enables developers to use the await keyword outside of async functions. It acts like a big async function causing other modules who import them to wait before they start evaluating their body. Though it doesn't sound like a big deal, it is of great use for developers. Await could be used anywhere. There is no need to have an async IIFE function to use await. This feature is supported by Deno but is ultimately implemented by v8.


Like all the major programming languages, Deno comes with a standard library that contains common peer-reviewed utilities like file, hash, HTTP, io, mime, WebSocket, log, date, time, UUID, crypto, hash, etc. Node.js also offers a similar std, but the big difference is that all the std services are available through promises. There are no old-style callbacks.