1
0
Fork 0
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/
Find a file
Matt Mastracci 4380a09a05
feat(ext/node): eagerly bootstrap node (#20153)
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
2023-08-16 04:36:36 +09:00
.cargo fix: reload config files on watcher restarts (#19487) 2023-06-14 22:29:19 +00:00
.devcontainer chore: update devcontainer configuration (#15751) 2022-09-03 02:21:41 +02:00
.github chore: forward v1.36.1 to main (#20119) 2023-08-10 16:44:41 +03:00
bench_util chore: forward v1.36.1 to main (#20119) 2023-08-10 16:44:41 +03:00
cli feat(ext/node): eagerly bootstrap node (#20153) 2023-08-16 04:36:36 +09:00
ext feat(ext/node): eagerly bootstrap node (#20153) 2023-08-16 04:36:36 +09:00
runtime feat(ext/node): eagerly bootstrap node (#20153) 2023-08-16 04:36:36 +09:00
test_ffi chore: update to Rust 1.71 (#19822) 2023-07-13 15:16:24 -06:00
test_napi fix(node): don't print warning on process.dlopen.flags (#20124) 2023-08-10 20:19:20 +02:00
test_util chore: upgrade fastwebsockets to 0.4.4 (#19089) 2023-08-10 09:59:06 +05:30
third_party@7f1a41fee1 chore: upgrade to dprint 0.40 internally (#19998) 2023-07-31 17:10:10 +02:00
tools fix(runtime): navigator.userAgent in web worker (#20129) 2023-08-15 17:04:36 +02:00
.dlint.json chore: update dlint to v0.37.0 for GitHub Actions (#17295) 2023-01-16 17:17:18 +01:00
.dprint.json fix(fmt): do not insert expr stmt leading semi-colon in do while stmt body (#20093) 2023-08-08 09:15:19 -04:00
.editorconfig editorconfig: Don't insert final newline in .out files (#1686) 2019-02-07 11:31:49 -05:00
.gitattributes fix(test): support typechecking docs with CRLF line endings (#12748) 2021-11-15 09:58:04 -05:00
.gitignore feat(cli): Adding JUnit test reports (#19747) 2023-07-27 00:12:35 +02:00
.gitmodules chore: check node_compat config diff in CI (#19119) 2023-05-15 21:22:53 +09:00
.rustfmt.toml chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
Cargo.lock chore: deno_core -> 0.201.0 (#20135) 2023-08-12 19:04:45 +00:00
Cargo.toml chore: deno_core -> 0.201.0 (#20135) 2023-08-12 19:04:45 +00:00
LICENSE.md chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
README.md docs: nitpick README (#19912) 2023-07-25 14:44:50 +09:00
Releases.md chore: forward v1.36.1 to main (#20119) 2023-08-10 16:44:41 +03:00
rust-toolchain.toml chore: update to Rust 1.71 (#19822) 2023-07-13 15:16:24 -06:00

Deno

Twitter badge Discord badge YouTube badge

the deno mascot dinosaur standing in the rain

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Features

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

Try running a simple program:

deno run https://deno.land/std/examples/welcome.ts

Or setup a simple HTTP server:

Deno.serve((_req) => new Response("Hello, World!"));

More Examples

Additional Resources

Contributing

We appreciate your help!

To contribute, please read our contributing instructions.