This guide walks you through compiling Andromeda from source.
Prerequisites
- Rust toolchain — Andromeda tracks a recent nightly toolchain pinned in
rust-toolchain.toml(currentlynightly-2025-10-20).rustupwill pick it up automatically. - Git
- Platform build tools — see below.
Platform-Specific Requirements
Linux
# Ubuntu / Debian
sudo apt update
sudo apt install build-essential git pkg-config libssl-dev
# Fedora / RHEL
sudo dnf install gcc gcc-c++ git openssl-devel pkgconf-pkg-config
# Arch
sudo pacman -S base-devel git openssl pkgconfFor the optional window feature you'll also need X11/Wayland and graphics
drivers compatible with wgpu.
macOS
xcode-select --installWindows
- Visual Studio Build Tools (with the "Desktop development with C++" workload) or Visual Studio Community
- Windows SDK (installed alongside the Build Tools)
- Git for Windows or WSL
Cloning
git clone https://github.com/tryandromeda/andromeda
cd andromedaInstalling Rust
If you don't have Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustc --version
cargo --versionThe pinned toolchain is downloaded automatically the first time you run cargo
inside the repo.
Building
Workspace overview
The repo is a Cargo workspace with three crates:
| Crate | Path | Purpose |
|---|---|---|
andromeda |
crates/cli |
CLI binary |
andromeda-core |
crates/core |
Core runtime / event loop |
andromeda-runtime |
crates/runtime |
Web API extensions |
Quick build
# Debug build (faster compile, slower runtime)
cargo build
# Release build (recommended for actual use)
cargo build --releaseThe binary lands at target/debug/andromeda or target/release/andromeda.
Running a script during development
cargo run --release -- run examples/canvas.tsInstalling locally
cargo install --path crates/cliThis installs andromeda to ~/.cargo/bin.
Feature Flags
Most extensions are gated behind Cargo features on the workspace-level
andromeda-runtime dependency. The default feature set (defined in the root
Cargo.toml) is:
andromeda-runtime = { features = ["canvas", "crypto", "storage", "serve"] }| Feature | What it adds |
|---|---|
canvas |
OffscreenCanvas, GPU graphics via wgpu, text via cosmic-text |
crypto |
crypto.subtle, randomUUID, getRandomValues (via ring/rand) |
storage |
SQLite (DatabaseSync), localStorage, sessionStorage, caches |
virtualfs |
In-memory virtual filesystem (implies storage) |
serve |
Andromeda.serve() HTTP server |
window |
Native Andromeda.Window via winit + wgpu |
hotpath |
Profiling instrumentation |
typescript |
Nova TypeScript support |
annex-b |
ECMAScript Annex B legacy features |
proposals |
Experimental TC39 proposals |
To build with a custom feature set:
# Without canvas (faster build, no graphics)
cargo build --release --no-default-features --features "crypto,storage,serve"
# Add native windowing
cargo build --release --features window
# Add the hotpath profiler
cargo build --release --features hotpathThe window feature is opt-in because it pulls in winit and platform
windowing libraries.
Running Examples
cargo run --release -- run examples/canvas.ts
cargo run --release -- run examples/sqlite.ts
cargo run --release -- run examples/fetch.ts
# Window + canvas example
cargo run --release --features window -- run examples/window.tsRunning the Test Suite
cargo test --workspaceSee the Testing Guide for more.
Formatting and Linting
cargo fmt --all
cargo clippy --workspace --all-targets --all-features -- -D warningsBuild Profiles
The release profile enables LTO for the smallest binary:
[profile.release]
lto = trueA custom hotpath profile inherits from release but disables LTO to keep
profiling builds fast.
Cleaning
cargo cleanTroubleshooting
- Linker errors on Linux — ensure
pkg-configandlibssl-dev(or the equivalent) are installed. wgpubuild failures — make sure your graphics drivers are up to date. For headless CI you can build without thecanvasorwindowfeatures.- Rust toolchain mismatch — run
rustup showfrom inside the repo to let rustup install the pinned nightly.