Show HN: LoongArch Userspace Emulator
4 months ago
- #Performance
- #Emulator
- #LoongArch
- High-performance LoongArch userspace emulator library for embedding and scripting applications.
- Built on libriscv architecture with competitive interpreter performance (~18k line codebase).
- Features include fast LoongArch interpreter with optional JIT, ultra-low latency call overheads (~4ns), and support for 64-bit LoongArch (LA64).
- Supports vector LSX and LASX instructions, with C++ API and Rust/Go bindings.
- Zero dependencies, execution timeout, memory safety, and first-class pause/resume support.
- Ideal for game engine scripting with significantly lower call overhead compared to traditional methods.
- CMake configuration options available for debug, binary translation, threaded bytecode dispatch, and memory settings.
- Example provided for loading and running a LoongArch ELF binary.
- Performance benchmarks show high memory rates and CoreMark scores, with JIT reaching up to 77% of native performance.