Emulate 32-Bit and 64-Bit RISC-V in Your Browser with Asami's Open Source rvemu

Available under the MIT Licence, Asami's emulator lets you run RISC-V programs directly in your browser using WebAssembly.

Gareth Halfacree
4 years agoHW101
The open RISC-V ISA is becoming increasing popular. (📷: Gareth Halfacree)

Graduate student Asami has released an emulator for 32-bit and 64-bit RISC-V projects which runs in the browser, courtesy of WebAssembly generated by Rust — making it easier than ever to begin experimenting with the free and open source instruction set architecture.

Released under the permissive MIT Licence, Asami's emulator supports all but three — FENCE, ECALL, and EBREAK — of the instructions specified in the RV32I v2.1 ISA specification plus all 12 of the additional instructions specified in the RV64I v2.1 specification. That's not the only trick up its sleeve, either: It supports all instructions in the M, A, F, and D extension standards in both 32-bit and 64-bit flavors — though its emulation of RV32A/RV64A lacks support for unit tests and atomic instructions.

The emulator takes Rust source code and generates WebAssembly binaries, plus a JavaScript application programming interface for running the WebAssembly in the browser. While available to download and run locally, the emulator is also provided as a remotely-accessible web app — and lets the user upload local files for execution without needing to install the emulator directly, using a trio of simple commands in a text-based interface.

"This is a work-in-progress project," Asami warns. "Bug reports or feature requests are always welcome."

The source code is available to download on Asami's GitHub repository; the hosted web app version, meanwhile, can be found on Firebase at riscvemu.web.app.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles