A RISC-V emulator written in Rust 🦀.
Inspired cnlohr/mini-rv32ima.
You can run linux in your browser.
$ cargo run -p app -- -i fixtures/linux.bin -d fixtures/default.dtb
$ cargo build -p wasi --target wasm32-wasi --release
$ wasmtime ./target/wasm32-wasi/release/wasi.wasm
$ cd wasm
$ cargo build --target wasm32-unknown-unknown --release
$ wasm-opt --asyncify [email protected] ../target/wasm32-unknown-unknown/release/wasm.wasm -o out.wasm
$ npx serve
- https://github.com/torvalds/linux/tree/master/arch/riscv
- https://www.five-embeddev.com/riscv-isa-manual/latest/machine.html
- https://github.com/riscv/riscv-isa-manual/releases/download/Priv-v1.12/riscv-privileged-20211203.pdf
- https://riscv.org/wp-content/uploads/2017/05/riscv-spec-v2.2.pdf
MIT