mirror of
https://github.com/denoland/deno.git
synced 2024-11-21 15:04:11 -05:00
A modern runtime for JavaScript and TypeScript.
https://deno.com/
4380a09a05
To fix bugs around detection of when node emulation is required, we will just eagerly initialize it. The improvements we make to reduce the impact of the startup time: - [x] Process stdin/stdout/stderr are lazily created - [x] node.js global proxy no longer allocates on each access check - [x] Process checks for `beforeExit` listeners before doing expensive shutdown work - [x] Process should avoid adding global event handlers until listeners are added Benchmarking this PR (`89de7e1ff`) vs main (`41cad2179`) ``` 12:36 $ third_party/prebuilt/mac/hyperfine --warmup 100 -S none './deno-41cad2179 run ./empty.js' './deno-89de7e1ff run ./empty.js' Benchmark 1: ./deno-41cad2179 run ./empty.js Time (mean ± σ): 24.3 ms ± 1.6 ms [User: 16.2 ms, System: 6.0 ms] Range (min … max): 21.1 ms … 29.1 ms 115 runs Benchmark 2: ./deno-89de7e1ff run ./empty.js Time (mean ± σ): 24.0 ms ± 1.4 ms [User: 16.3 ms, System: 5.6 ms] Range (min … max): 21.3 ms … 28.6 ms 126 runs ``` Fixes https://github.com/denoland/deno/issues/20142 Fixes https://github.com/denoland/deno/issues/15826 Fixes https://github.com/denoland/deno/issues/20028 |
||
---|---|---|
.cargo | ||
.devcontainer | ||
.github | ||
bench_util | ||
cli | ||
ext | ||
runtime | ||
test_ffi | ||
test_napi | ||
test_util | ||
third_party@7f1a41fee1 | ||
tools | ||
.dlint.json | ||
.dprint.json | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.rustfmt.toml | ||
Cargo.lock | ||
Cargo.toml | ||
LICENSE.md | ||
README.md | ||
Releases.md | ||
rust-toolchain.toml |
Deno
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
Features
- Secure by default. No file, network, or environment access, unless explicitly enabled.
- Provides
web platform functionality and APIs,
e.g. using ES modules, web workers, and
fetch()
. - Supports TypeScript out of the box.
- Ships only a single executable file.
- Built-in tooling including
deno test
,deno fmt
,deno bench
, and more. - Includes a set of reviewed standard modules guaranteed to work with Deno.
- Supports npm.
Install
Shell (Mac, Linux):
curl -fsSL https://deno.land/install.sh | sh
PowerShell (Windows):
irm https://deno.land/install.ps1 | iex
Homebrew (Mac):
brew install deno
Chocolatey (Windows):
choco install deno
Scoop (Windows):
scoop install deno
Build and install from source using Cargo:
cargo install deno --locked
See deno_install and releases for other options.
Getting Started
deno run https://deno.land/std/examples/welcome.ts
Or setup a simple HTTP server:
Deno.serve((_req) => new Response("Hello, World!"));
Additional Resources
- The Deno Manual is a great starting point for additional examples, setting up your environment, using npm, and more.
- Runtime API reference documents all APIs built into Deno CLI.
- Deno Standard Modules do not have external dependencies and are reviewed by the Deno core team.
- deno.land/x is the registry for third party modules.
- Blog is where the Deno team shares important product updates and “how to”s about solving technical problems.
Contributing
We appreciate your help!
To contribute, please read our contributing instructions.