Getting started

Quick start

Clone the repository, build the WebAssembly module, and run your first RISC-V command in under a minute.

Build the module

The core builds to a ~585 KB WebAssembly module without bundled binaries. You will need a recent Rust toolchain with the WASM target installed.

bash
git clone https://github.com/userland-run/nano
cd nano

# build the WASM module (~585KB without bundled binaries)
make build

Run the tests

The suite covers the in-memory filesystem, ELF execution, BusyBox smoke tests and the devenv tools.

bash
make test
# Results: 24 passed, 0 failed

Run a command

The test runner loads an image and executes a single command inside the VM.

bash
# a BusyBox command
node test/run.mjs images/busybox --cmd echo "Hello from RISC-V"

# a Node.js script
node test/run.mjs images/node --cmd node -e "console.log(process.arch)"
# riscv64

Launch the web demo

The browser IDE bundles the WASM module with BusyBox, Node, and a dev environment, then serves it with Vite.

bash
make demo
The demo requires images/busybox, images/node and build/devenv.tar.gz. See the Build guide for how to produce them.