Build from Source
This guide walks through building Thunder from a local checkout of the repository. Make sure you have the prerequisites installed before continuing.
Clone the repository
Section titled “Clone the repository”git clone https://github.com/thunder-edge/runtime.gitcd deno-edge-runtimeBuild with Cargo
Section titled “Build with Cargo”Debug build
Section titled “Debug build”A debug build compiles faster and includes debug symbols, which is ideal for day-to-day development:
cargo buildThe binary is written to target/debug/thunder.
Release build
Section titled “Release build”A release build enables full optimizations. Use this when benchmarking or producing a binary for deployment:
cargo build --releaseThe binary is written to target/release/thunder.
Build with Make
Section titled “Build with Make”The repository includes a Makefile with common shortcuts:
# Debug buildmake build
# Release build (also copies binary to ./thunder)make release
# Release build + copy to /usr/local/binmake installRun directly with Cargo
Section titled “Run directly with Cargo”During development you can skip the explicit build step and run Thunder in one command:
cargo run -- startAny arguments after -- are forwarded to the Thunder binary.
Cargo aliases
Section titled “Cargo aliases”The project defines several Cargo aliases in .cargo/config.toml for running tests:
| Alias | Description |
|---|---|
cargo test-dev | Fast local loop — runs workspace tests but skips long E2E and stress tests. |
cargo test-full | Full Rust test suite across the entire workspace. |
cargo test-server-e2e | Runs only the server E2E tests (useful when working on ingress or admin paths). |
A note about V8 compilation
Section titled “A note about V8 compilation”Thunder depends on rusty_v8, which bundles the V8 JavaScript engine. On the first build, Cargo downloads a prebuilt V8 static library from the rusty_v8 releases mirror. If a prebuilt binary is not available for your platform, V8 will be compiled from source, which can take a significant amount of time (30 minutes or more depending on your hardware). Subsequent builds reuse the cached artifact and are much faster.