RiceVM is a cross-platform Dis virtual machine and Limbo compiler implemented in Rust.
- Supports all 176 Dis VM opcodes
- Provides a fully functional Dis runtime (with GC, concurrency, etc.)
- Includes a Limbo compiler,
.disfile disassembler, and debugger - Includes most of the built-in modules from Dis virtual machine, including
$Sys,$Math,$Crypt, etc. - Supports for GUI applications and audio playback
- Is fully cross-platform (runs on Windows, Linux, and macOS)
See ROADMAP.md for the full list of implemented and planned features.
Important
RiceVM is still in early development, so bugs and breaking changes are expected. Please use the issues page to report bugs or request features.
# Clone the repository
git clone --recursive --depth=1 https://github.com/habedi/ricevm.git
cd ricevm
# Build RiceVM from source
cargo build --release
# Run a pre-compiled Inferno program
cargo run -p ricevm-cli -- run external/inferno-os/dis/echo.dis \
--probe external/inferno-os/dis -- hello world
# Disassemble a .dis module
cargo run -p ricevm-cli -- dis external/inferno-os/dis/echo.dis
# Create a Hello world program in Limbo language (`hello.b`)
cat > hello.b << 'EOF'
implement Hello;
include "sys.m";
include "draw.m";
Hello: module {
init: fn(ctxt: ref Draw->Context, argv: list of string);
};
init(ctxt: ref Draw->Context, argv: list of string) {
sys := load Sys Sys->PATH;
sys->print("hello world\n");
}
EOF
# Compile the Limbo program using the built-in compiler
cargo run -p ricevm-cli -- compile hello.b
# Run the compiled program
cargo run -p ricevm-cli -- run hello.dis --probe external/inferno-os/dis
# Or compile using the original Inferno Limbo compiler (runs on RiceVM itself)
cargo run -p ricevm-cli -- run external/inferno-os/dis/limbo.dis \
--probe external/inferno-os/dis --probe external/inferno-os/dis/lib \
-- -I external/inferno-os/module hello.b
# Run the compiled program
cargo run -p ricevm-cli -- run hello.dis --probe external/inferno-os/dis
# Run with instruction tracing (this is useful for debugging)
cargo run -p ricevm-cli -- run external/inferno-os/dis/echo.dis \
--probe external/inferno-os/dis --trace -- hello world
# Run the About Inferno dialog with GUI (this needs SDL2)
cargo run -p ricevm-cli --release --features gui -- run external/inferno-os/dis/wm/about.dis \
--probe external/inferno-os/dis --probe external/inferno-os/dis/lib \
--root external/inferno-osThe latest release of RiceVM can be downloaded from here insead of building it from source.
Check the RiceVM documentation for usage examples and API reference for the CLI and built-in Limbo modules, etc.
See CONTRIBUTING.md for details on how to make a contribution.
This project is licensed under either of these:
- MIT License (LICENSE-MIT)
- Apache License, Version 2.0 (LICENSE-APACHE)
- The logo is from SVG Repo with some modifications.
- This project uses various things from the Inferno OS project including the Limbo compiler and Dis virtual machine implementation as reference for testing and verifying implementation correctness.