Skip to main content
Contributions are welcome, from bug reports to new device support. Open an issue to discuss anything substantial before building it. For an overview of the repository layout and snapshot build scripts, see the README.

Prerequisites

  • Rust (latest stable) with the wasm32-wasip2 target: rustup target add wasm32-wasip2
  • Python 3.10+ for the Python SDK
  • Node 20+ for the TypeScript SDK
  • Zig (0.16) and bsdtar, only needed if you build snapshots yourself

Development setup

The stub generated by aot-stub.sh is fine for everyday development. Everything works the same, just slower. Full AOT translation only happens during snapshot builds and is optional.
npm run build defaults to --tier aot while CI pins --tier base. The build refuses a component older than the newest file under crates/, so rerun ./scripts/build-wasm.sh after touching the emulator. An emulator change only surfaces through the guest, so a stale component compiles and passes almost everything.

Running the checks

CI runs these on every PR, so run them before pushing:
For the TypeScript SDK, from sdks/typescript:
The TypeScript tests import the built dist/, not src/, so build before running them. They look for a snapshot in the shared cache directory; VPOD_TEST_SNAPSHOT=/path/to/x.snap points them somewhere else.
To exercise the browser end to end, npm run dev serves the page with COOP and COEP on, and node dev/run-network.mjs --browser chrome drives it headless. npm run example serves the xterm.js terminal from examples/terminal.

Using a locally built snapshot

The SDKs pull from registry.vpod.sh by default. To run one you built yourself, hand it over directly instead of a registry name:
Keep the RAM size in the file name either way, because the emulator reads it from there.

Building snapshots

The project uses pre-built Alpine snapshots from registry.vpod.sh, so you normally do not need this. To build one locally:
Snapshot builds can also run the AOT pass with scripts/aot-snapshot.sh <snapshot>, which traces a representative workload, translates the hot blocks, and rebuilds the emulator with them baked in. It takes a while, and the stub is fine until you need the speed.

Pull requests

  • Keep PRs focused: one change per PR.
  • fmt, clippy and the test suite must pass. CI enforces all three.
  • If you touch the emulator’s execution or memory paths, say how you validated correctness. The test suite is the minimum; for subtle changes a boot plus a real workload in the guest is a good sanity check.

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.