| Crates.io | rmachine |
| lib.rs | rmachine |
| version | 0.1.0 |
| created_at | 2025-10-03 11:16:42.848028+00 |
| updated_at | 2025-10-03 11:16:42.848028+00 |
| description | A simple 32-bit RISC CPU emulator and assembler |
| homepage | https://github.com/aleury/rmachine |
| repository | https://github.com/aleury/rmachine |
| max_upload_size | |
| id | 1866538 |
| size | 125,778 |
A simple 32-bit RISC CPU emulator and assembler written in Rust.
R-Machine is an educational project that implements a minimal RISC (Reduced Instruction Set Computer) architecture. It includes:
rasm), debugger (rmon), and disassembler (rdis)cargo install rmachine
Or build from source:
git clone https://github.com/aleury/rmachine
cd rmachine
cargo build --release
Assemble source code into executable format:
rasm input.s # Creates input (executable without extension)
rasm input.s -o output # Specify custom output file
Run programs with debugging support:
rmon program.rmx # Run with debugger
rmon program.rmx -d # Start in debug mode
Disassemble executable files:
rdis program.rmx
The examples/ directory contains sample R-Machine assembly programs:
ex1.s - Hello World program demonstrating system callsRun an example:
rasm examples/ex1.s -o hello.rmx
rmon hello.rmx
This project is dual-licensed under MIT OR Apache-2.0.