Runs JavaScript and TypeScript in the command-line
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Rewrite tools/format.py in deno (#1528) Jan 17, 2019
build @ 1e3840b build: write a gcc-style depfile when using clang-cl (#1525) Jan 15, 2019
build_extra chore: update license lines (#1557) Jan 21, 2019
js chore: update license lines (#1557) Jan 21, 2019
libdeno chore: update license lines (#1557) Jan 21, 2019
prebuilt Update sccache.exe (fixes #1526) (#1529) Jan 15, 2019
src chore: update license lines (#1557) Jan 21, 2019
tests Avoid crashes on ES module resolution when module not found (#1546) Jan 18, 2019
third_party @ 2e41cca third_party: upgrade rust crates, now with `--edition 2018` support Jan 14, 2019
tools chore: update license lines (#1557) Jan 21, 2019
website chore: update license lines (#1557) Jan 21, 2019
.appveyor.yml ci: work around appveyor cache bug Jan 17, 2019
.gitattributes Add LSAN build to travis. Dec 3, 2018
.gitignore travis: Set CARGO_HOME to third_party/rust_crates (#1370) Dec 19, 2018
.gitmodules deno_net -> deno_std rename Dec 24, 2018
.gn Revert "Remove symbol_level=1 override (#1532)" Jan 17, 2019
.prettierignore Pipe new exception info through into JSError Jan 12, 2019
.prettierrc.json tools/format: format markdown files with prettier Oct 4, 2018
.travis.yml Rewrite tools/format.py in deno (#1528) Jan 17, 2019
BUILD.gn chore: update license lines (#1557) Jan 21, 2019
Cargo.lock v0.2.8 Jan 19, 2019
Cargo.toml chore: update license lines (#1557) Jan 21, 2019
Docs.md Rewrite tools/format.py in deno (#1528) Jan 17, 2019
LICENSE Happy new year! Jan 2, 2019
README.md Add some links to website Jan 10, 2019
Releases.md docs(Releases.md): correct go prototype dates Jan 20, 2019
Roadmap.md Add Docs.md Oct 20, 2018
build.rs chore: update license lines (#1557) Jan 21, 2019
build_overrides move v8 to third_party/v8 (#322) Jul 3, 2018
buildtools move v8 to third_party/v8 (#322) Jul 3, 2018
gclient_config.py chore: update license lines (#1557) Jan 21, 2019
node_modules chore: reorganize symlinks Jul 6, 2018
package.json Process source maps in Rust instead of JS (#1280) Dec 7, 2018
rollup.config.js chore: update license lines (#1557) Jan 21, 2019
testing move v8 to third_party/v8 (#322) Jul 3, 2018
tsconfig.json build: Use target/ instead of out/ (#1153) Nov 8, 2018
tslint.json tslint: no-unused-variable is deprecated. Oct 4, 2018

README.md

deno

Linux & Mac Windows

A secure JavaScript / TypeScript runtime built on V8

  • Supports TypeScript out of the box. Uses a recent version of V8. That is, it's very modern JavaScript.

  • No package.json. No npm. Not explicitly compatible with Node.

  • Imports reference source code URLs only.

    import { test } from "https://unpkg.com/deno_testing@0.0.5/testing.ts";
    import { log } from "./util.ts";

    Remote code is fetched and cached on first execution, and never updated until the code is run with the --reload flag. (So, this will still work on an airplane. See ~/.deno/src for details on the cache.)

  • File system and network access can be controlled in order to run sandboxed code. Defaults to read-only file system access and no network access. Access between V8 (unprivileged) and Rust (privileged) is only done via serialized messages defined in this flatbuffer. This makes it easy to audit. To enable write access explicitly use --allow-write and --allow-net for network access.

  • Single executable:

    > ls -lh target/release/deno
    -rwxr-xr-x  1 rld  staff    48M Aug  2 13:24 target/release/deno
    > otool -L target/release/deno
    target/release/deno:
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
      /usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
      /System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.51.6)
      /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
    >
    
  • Always dies on uncaught errors.

  • Aims to support top-level await.

  • Aims to be browser compatible.

See the website for more info deno.land.

Install

With Python:

curl -L https://deno.land/x/install/install.py | python

With PowerShell:

iex (iwr https://deno.land/x/install/install.ps1)

Note: Depending on your security settings, you may have to run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser first to allow downloaded scripts to be executed.

With Scoop:

scoop install deno

Try it:

> deno https://deno.land/thumb.ts

See deno_install for more installation methods..