• Engineer at (we’re building an open source API gateway!). • I love FOSS and security topics. • Hobbies: meet random people, improvise music, eat pasta.
built on V8. • No explicitly compatible with NodeJS (also: no npm, no package.json, etc.). • The initial prototype used a Golang backend, current one is written in Rust. C++ is used in a minimal way to bind V8 to these alternative backends.
access disabled by default. • Syscalls are easier to audit and could provide a good security framework for some applications. • Minimal number of V8 interactions: send, recv (used for in-memory message passing).
open(…) (posix) Golang V8 Channels os deno.readFileSync(…) Publishes a message containing the filename and other parameters. After receiving the message, the dispatcher calls ReadFileSync(…)
open(…) (posix) Golang V8 Channels os ReadFileSync(…) Reads the file and publishes a message to the “os” channel, containing the file contents. We get the file contents!
open(…) (posix) Golang V8 Channels os net http The runtime can implement different channels for each required module. The messages are serialized using Protocol Buffers*.
language and doesn’t allow passing Go pointers to the native side (the opposite is possible though), this might result in unnecessary allocations under some circumstances. • Using deno with a Go backend involved two GCs! This is a potential issue ry mentioned and one of the reasons to replace Go with Rust, which it’s not GCed.
start multiple V8 workers but there’s no easy way of accessing these workers from the Go side, a “worker table” was used, involving a mutex as you can find in: https:// github.com/ry/v8worker2 • I did a Rust port of this library to continue my experiment: https://github.com/ matiasinsaurralde/rust-v8worker2
initial implementation after the project was announced in JSConf (June 6, 2018). • The initial implementation used Golang and a simple dispatcher (very similar to the current one).
backend. • Everything is contained on a single binary (a minimal V8 build is embedded into this). • Roadmap here: https://github.com/ denoland/deno/blob/master/Roadmap.md
Flatbuffers: this is a great thing in terms of memory usage! • Browser compatibility is planned. • Experimental binaries are being released from time to time (Linux, Windows and OS X).