Build guide
Build the NanoVM WebAssembly images from the nano repository: the slim emulator, the BusyBox image used for terminals, the Boa engine and the wasm apps, then run the test suite.
Prerequisites
- Rust nightly with
rust-src(rust-toolchain.tomlpinsnightlyand thewasm32-unknown-unknowntarget). The shared-memory build recompilescorewith atomics via build-std. - Node.js for the tests and
test/run.mjs. - Optional:
wasm-opt(shrinksboa.wasm), thewasm32-wasip1target (wasm apps), a riscv64 cross-compiler (test ELFs), Docker (make devenv).
Make targets
make buildwasm/nano.wasmmake build-busyboxwasm/nano.busybox.wasmconsole.wasmmake build-boawasm/boa.wasmwasm-opt when available (2,813,775 bytes)make build-fullwasm/nano.wasm--features demo); needs the images and build/devenv.tar.gzmake build-minimalwasm/nano.wasmtrace feature (per-syscall debug_log), for test/run.mjs --tracemake build-minwasm/nano.min.wasmmake build-tracewasm/nano.trace.wasmmake build-rgapps/core/rg.wasmrg --files for the wasm runnermake build-photonapps/core/photon.wasmmake devenvbuild/devenv.tar.gzmake servemake build, then python3 -m http.server 8080 in wasm/make testmake build-minimal, then bash test/run_tests.shmake test-devenvmake build, then the suite with --devenvmake test-boa / test-boa-vmmake test-tracemake test-buildmake cleancargo clean and removes the built wasm filesSizes are of the v0.2.1 artifacts in this site's /nano/ directory. The devenv archive (build/devenv.tar.gz) is 113,955,964 bytes, which is why the legacy all-in-one build is large; prefer installing tools from the catalog.
Feature flags
busyboxrunners/riscv/images/busybox (1,149,392-byte ELF, gzipped into the data section)noderunners/riscv/images/node (legacy; prefer the catalog's node)devenvbuild/devenv.tar.gz (legacy)demotracedebug_log(0x0A | nr) eventsMemory configuration
# .cargo/config.toml
[target.wasm32-unknown-unknown]
rustflags = [
"-C", "target-feature=+atomics,+bulk-memory,+mutable-globals,+sign-ext,+nontrapping-fptoint",
"-C", "link-args=-z stack-size=1048576 --initial-memory=201326592 --max-memory=2147483648 --shared-memory --import-memory",
]1 MiB stack, 192 MiB initial and 2 GiB maximum shared memory imported from the host. Release profile: opt-level = 3, lto = "fat", codegen-units = 1, panic = "abort", strip = true.
Tests
bash test/run_tests.sh runs the MemFS, net-bridge and kernel unit tests, the nodert tier (smoke, differential against the Node.js oracle, ordering, engine selector, ESM, worker_threads, wasm tier, WASI services, cross-tier chains), the applet differential tests, ELF execution, BusyBox smoke tests, shipped-host tests and the Boa scripting layer. Run on 2026-10-11 against the slim v0.2.1 build:
$ bash test/run_tests.sh … --- Devenv Tool Tests --- SKIP: Devenv tool tests (no bundled WASM - run 'make build' then use --devenv) Phase: Scripting layer (Boa) PASS: scripting: Boa scripting: 21 passed, 0 failed ============================================ Results: 56 passed, 0 failed, 1 skipped (57 total) ============================================
Each result line is one test phase; a phase such as "MemFS Unit Tests" (50 assertions) counts once. Devenv tool tests need a bundled build and --devenv.
Use your build
Serve the files next to your app and point the SDK at them: createNano({ image: { wasm: "/nano/console.wasm" } }). See Quick start and Configuration.