deno.land / x / manual@v1.28.2 / references / contributing / building_from_source.md
deno
from SourceBelow are instructions on how to build Deno from source. If you just want to use
Deno you can download a prebuilt executable (more information in the
Getting Started
chapter).
Clone on Linux or Mac:
git clone --recurse-submodules https://github.com/denoland/deno.git
Extra steps for Windows users:
core.symlinks=true
before the checkout:git config --global core.symlinks true
git clone --recurse-submodules https://github.com/denoland/deno.git
Deno requires the progressively latest stable release of Rust. Deno does not support the Rust Nightly Releases.
Update or Install Rust. Check that Rust installed/updated correctly:
rustc -V
cargo -V
For Apple aarch64 users lld
must be installed.
brew install llvm
# Add /opt/homebrew/opt/llvm/bin/ to $PATH
The easiest way to build Deno is by using a precompiled version of V8:
cargo build -vv
However if you want to build Deno and V8 from source code:
V8_FROM_SOURCE=1 cargo build -vv
When building V8 from source, there are more dependencies:
Python 3 for running WPT tests. Ensure that
a suffix-less python
/python.exe
exists in your PATH
and it refers to
Python 3.
For Linux users glib-2.0 development files must also be installed. (On Ubuntu,
run apt install libglib2.0-dev
.)
Mac users must have Command Line Tools installed.
(XCode already includes CLT. Run
xcode-select --install
to install it without XCode.)
For Windows users:
Get VS Community 2019 with "Desktop development with C++" toolkit and make sure to select the following required tools listed below along with all C++ tools.
Enable "Debugging Tools for Windows". Go to "Control Panel" → "Programs" →
"Programs and Features" → Select "Windows Software Development Kit - Windows
10" → "Change" → "Change" → Check "Debugging Tools For Windows" → "Change" →
"Finish". Or use:
Debugging Tools for Windows
(Notice: it will download the files, you should install
X64 Debuggers And Tools-x64_en-us.msi
file manually.)
See rusty_v8's README for more details about the V8 build.
Build with Cargo:
# Build:
cargo build -vv
# Build errors? Ensure you have latest main and try building again, or if that doesn't work try:
cargo clean && cargo build -vv
# Run:
./target/debug/deno run cli/tests/testdata/run/002_hello.ts
Version Info