Deno
A new way to JavaScript
Linux & Mac | Windows | |
---|---|---|
deno | ||
deno_std | ||
deno_install | ||
registry |
#Install
With Shell
curl -fL https://deno.land/x/install/install.sh | sh
With PowerShell
iex (iwr https://deno.land/x/install/install.ps1)
#Mini-tutorial
Try a Deno program. This one serves a local directory in HTTP.
alias file_server="deno \ https://deno.land/x/http/file_server.ts --allow-net"
Run it:
% file_server . Downloading https://deno.land/x/http/file_server.ts... [...] HTTP server listening on http://0.0.0.0:4500/
And if you ever want to upgrade to the latest published version:
file_server --reload
#Dig in...
DocumentationLinks to other Deno resources.
#Continuous Benchmarks
These plots are updated on every commit to
#Execution time
This shows how much time total it takes to run a few simple deno programs:
tests/002_hello.tsand
For deno to execute typescript, it must first compile it to JS. A warm startup is when deno has a cached JS output already, so it should be fast because it bypasses the TS compiler. A cold startup is when deno must compile from scratch.
#Throughput
Time it takes to pipe a certain amount of data through Deno.
echo_server.tsand
cat.tsSmaller is better.
#Req/Sec
Tests HTTP server performance. 10 keep-alive connections do as many hello-world requests as possible. Bigger is better.
- deno is a fake http server that doesn't parse HTTP. It is comparable to node_tcp .
- deno_net_http is a web server written in TypeScript. It is comparable to node_http .
- hyper is a Rust HTTP server and represents an upper bound.
#Executable size
deno ships only a single binary. We track its size here.
#Thread count
How many threads various programs use.
#Syscall count
How many total syscalls are performed when executing a given script.