2 min read

Deno is a runtime by creator of Node, Ryan Dahl. It aims at fixing some of the problems in Node. Originally written in Go, Deno is now rewritten in Rust and is in version 0.1.

Node.js was developed nearly a decade ago. It was designed in 2009 to use server-side JavaScript. The implementation solved problems of 2009, for which Dahl has no regrets. But lately, he did have regrets elaborated in a talk on 10 things he regrets about Node in the JSConf 2018. Some of the regrets included packages, security issues, the entire build system, among others.

Deno is a secure TypeScript run-time on Chrome V8. It was originally written in Go and now has been rewritten in Rust to avoid potential garbage collector issues. Deno is similar to Node.js but is focused on security. Deno takes full advantage of JavaScript being a secure sandbox. So, unlike Node.js, Deno is sandboxed.

Scripts should run without any write access by default. Using untrusted utilities like linters will be optional. There is no package.json in Deno, no npm and it is not explicitly compatible with Node.

An important thing to note is that the requirement is Python 2, not Python 3. This is because Chrome V8 scripts still use Python 2.

There were plans to rewrite Deno in Rust when it was originally released in June this year. Dahl mentioned in a GitHub comment: “The reason for not using Go is that it has a rather complex runtime – including a GC. Although I haven’t experienced any problems with that yet, it’s not hard to imagine that down the road that might clash badly with V8’s very complex runtime.

You can get the binaries here to get started and check out the Github repo.

Read next

Deploying Node.js apps on Google App Engine is now easy

Creating Macros in Rust [Tutorial]

Rust Language Server, RLS 1.0 releases with code intelligence, syntax highlighting and more

Data science enthusiast. Cycling, music, food, movies. Likes FPS and strategy games.

LEAVE A REPLY

Please enter your comment!
Please enter your name here