It's built on V8, Rust, and Tokio.
- Web compatible where possible, for example through usage of ES modules, and
- Secure by default. No file, network, or environment access (unless explicitly enabled).
- Supports TypeScript out of the box.
- Ships a single executable (
- Has built-in utilities like a code formatter (
deno fmt), a linter (
deno lint), and a test runner (
- Has a set of reviewed (audited) standard library that are guaranteed to work with Deno.
Deno aims to be a productive and secure scripting environment for the modern programmer.
Deno will always be distributed as a single executable. Given a URL to a Deno program, it is runnable with nothing more than the ~25 megabyte zipped executable. Deno explicitly takes on the role of both runtime and package manager. It uses a standard browser-compatible protocol for loading modules: URLs.
Among other things, Deno is a great replacement for utility scripts that may have been historically written with Bash or Python.
- Ship as just a single executable (
- Provide secure defaults.
- Unless specifically allowed, scripts can't access files, the environment, or the network.
- Be browser-compatible.
do not use the global
Denonamespace (or feature test for it), ought to also be able to be run in a modern web browser without change.
- Provide built-in tooling to improve developer experience.
- E.g. unit testing, code formatting, and linting.
- Keep V8 concepts out of user land.
- Serve HTTP efficiently.
Comparison to Node.js
Deno does not use
- It uses modules referenced as URLs or file paths.
Deno does not use
package.jsonin its module resolution algorithm.
All async actions in Deno return a promise. Thus Deno provides different APIs than Node.
Deno requires explicit permissions for file, network, and environment access.
Deno always dies on uncaught errors.
Deno uses "ES Modules" and does not support
require(). Third party modules are imported via URLs:
import * as log from "https://firstname.lastname@example.org/log/mod.ts";
Other key behaviors
- Fetch and cache remote code upon first execution, and never update it until
the code is run with the
--reloadflag. (So, this will still work on an airplane.)
- Modules/files loaded from remote URLs are intended to be immutable and cacheable.