nanowasm

A small standalone WebAssembly interpreter in Rust. Currently not really usable, yet.

Goals

This is a hobby project, not intended to be a professional-grade tool. But if it gets to that point, great! I think a small, lightweight interpreter would be really useful for things like embedding, running unit tests on generated wasm code, as an extension system, etc.

The road map is, more or less in order:

Non-goals

Building programs

Fetch and build wabt, which contains useful low-level tools like assemblers.

sudo apt install clang cmake git clone --recursive https://github.com/WebAssembly/wabt.git cd wabt make -j$(nproc)

The assembler is wat2wasm, so use that.

cd test_programs wat2wasm inc.wast

This should create a inc.wasm program which is what you can actually load and run:

cargo run -- test_programs/inc.wasm

...except the bin target doesn't actually use the interpreter yet XD

Similar projects

Licence

Apache/MIT