Skip to content

Latest commit

 

History

39 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Project Logo

RiceVM

Tests Code Coverage Docs License Release

A Dis virtual machine and Limbo compiler implemented in Rust


RiceVM is a cross-platform Dis virtual machine and Limbo compiler implemented in Rust.

Features

  • Supports all 176 Dis VM opcodes
  • Provides a fully functional Dis runtime (with GC, concurrency, etc.)
  • Includes a Limbo compiler, .dis file disassembler, and debugger
  • Includes most of the built-in modules from Dis virtual machine, including $Sys, $Math, $Crypt, etc.
  • Supports 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.


Quickstart

# 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` file
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-os

Simple Demo

asciicast

Pre-built Binaries

The latest release of RiceVM can be downloaded from here instead of building it from source.


Documentation

Check the RiceVM documentation for usage examples and API reference for the CLI and built-in Limbo modules, etc.


Contributing

See CONTRIBUTING.md for details on how to make a contribution.

License

This project is licensed under either of these:

Acknowledgements

  • 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.

About

A Dis virtual machine and Limbo compiler in Rust 🦀

Topics

Resources

Code of conduct

Contributing

Stars

10 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages