mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
A modern runtime for JavaScript and TypeScript.
https://deno.com/
![]() Alternative to https://github.com/denoland/deno/pull/18726. This was suggested by @piscisaureus. It's a bit ugly, but it does the work and makes cloning `JsRealm` very cheap, while not requiring invasive changes. Also managed to remove some vector and `v8::Global` clones which yields about 5% improvement in the "async_ops_deferred.js" benchmark. This PR: ``` time 1689 ms rate 592066 time 1722 ms rate 580720 time 1629 ms rate 613873 time 1578 ms rate 633713 time 1585 ms rate 630914 time 1574 ms rate 635324 ``` `main` branch: ``` time 1687 ms rate 592768 time 1676 ms rate 596658 time 1651 ms rate 605693 time 1652 ms rate 605326 time 1638 ms rate 610500 ``` |
||
---|---|---|
.cargo | ||
.devcontainer | ||
.github | ||
bench_util | ||
cli | ||
core | ||
ext | ||
ops | ||
runtime | ||
serde_v8 | ||
test_ffi | ||
test_napi | ||
test_util | ||
third_party@fef5eaa2e3 | ||
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:
import { serve } from "https://deno.land/std@0.182.0/http/server.ts";
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.