.cargo | ||
.devcontainer | ||
.github | ||
bench_util | ||
cli | ||
ext | ||
runtime | ||
test_ffi | ||
test_napi | ||
test_util | ||
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
<<<<<<< HEAD
Deno
(/ˈdiːnoʊ/, pronounced
dee-no
) is a JavaScript, TypeScript, and WebAssembly runtime with secure
defaults and a great developer experience. It's built on V8,
Rust, and Tokio.
Learn more about the Deno runtime in the documentation.
Installation
Install the Deno runtime on your system using one of the commands below. Note that there are a number of ways to install Deno - a comprehensive list of installation options can be found here.
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
8c07f52a7
(1.38.4 (#21398))
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
<<<<<<< HEAD
Build and install from source
Complete instructions for building Deno from source can be found in the manual here.
Your first Deno program
Deno can be used for many different applications, but is most commonly used to
build web servers. Create a file called server.ts
and include the following
TypeScript code:
Deno.serve((_req: Request) => {
return new Response("Hello, world!");
});
Run your server with the following command:
deno run --allow-net server.ts
This should start a local web server on http://localhost:8000.
Learn more about writing and running Deno programs in the docs.
Additional resources
- Deno Docs: official guides and reference docs for the Deno runtime, Deno Deploy, and beyond.
- Deno Standard Library: officially supported common utilities for Deno programs.
- deno.land/x: registry for third-party Deno modules.
- Developer Blog: Product updates, tutorials, and more from the Deno team.
Contributing
We appreciate your help! To contribute, please read our contributing instructions.
Scoop (Windows):
scoop install deno
Build and install from source using Cargo:
# Install build dependencies
apt install -y cmake protobuf-compiler # Linux
brew install cmake protobuf # macOS
# Build and install Deno
cargo install deno --locked
See deno_install and releases for other options.
Getting Started
deno run https://examples.deno.land/hello-world.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.
8c07f52a7
(1.38.4 (#21398))