You can run Linux or xv6 on the emulator in your browser. Online demo is here
The emulator supports almost all instructions listed above but some instructions which are not used in Linux or xv6 are not implemented yet. Your contribution is very welcome.
The emulator module is released at crates.io. Add the following line into Cargo.toml of your Rust project.
[dependencies] riscv_emu_rust = "0.2.0"
Refer to Document for the API.
$ git clone https://github.com/takahirox/riscv-rust.git $ cd riscv-rust $ cargo build --release
$ cd riscv-rust/cli # Run Linux $ cargo run --release ../resources/linux/opensbi/fw_payload.elf -f ../resources/linux/rootfs.img # Run xv6 $ cargo run --release ../resources/xv6/kernel -f ../resources/xv6/fs.img
$ cd riscv-rust/cli $ cargo run $path_to_riscv_tets/isa/rv32ui-p-add -n