Skip to content

bokuweb/r2

Repository files navigation

R2

GitHub Actions Status

A RISC-V emulator written in Rust 🦀.
Inspired cnlohr/mini-rv32ima.

Capture

You can run linux in your browser.

capture

Playground

https://bokuweb.github.io/r2/

Native

$ cargo run -p app -- -i fixtures/linux.bin -d fixtures/default.dtb

WASI

$ cargo build -p wasi --target wasm32-wasi --release
$ wasmtime ./target/wasm32-wasi/release/wasi.wasm

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

Special Thanks

References

License

MIT