3 ms·
I agree; wasm would be a better choice, as it's specifically designed for this use case. RISC-V is designed for hardware implementation, not to be an IR, which
by pcwalton 2y ago
I agree; wasm would be a better choice, as it's specifically designed for this use case. RISC-V is designed for hardware implementation, not to be an IR, which means that things are more verbose than they need to be. For example, accessing an arbitrary 64-bit address requires 6 instructions [1] in RISC-V, whereas in Wasm you can just do it. Even more important than ISA differences, though, is that with Wasm you get WASI, which saves you a whole lot of time creating a sandboxed system interface.
[1]: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/388#issuecomment-1737115297 https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/38...
- snvzz 2y agoWhile legacy ISAs can easily emulate RISC-V, it is actually native on RISC-V. Considering RISC-V is inevitable, this will prove a good decision.