Mini Rust Compiler

Mini Rust → ARM64 assembly → run in your browser

Code Lexer Parser Codegen Assembly Run
Source test_program.rs
Loading compiler…

          

          

          

What is this?

A playground for a mini Rust subset compiler written in Rust. Your source is lexed, parsed, and lowered to ARM64 assembly by the real project pipeline (compiled to WebAssembly). After compile, an in-browser ARM64 emulator can Run the generated assembly and capture stdout.

Pipeline

Code → Lexer → Parser → Codegen → Assembly → Run (emulated)

The Run step interprets the macOS ARM64 text the compiler emits and traps svc syscalls (write, mmap, …). Native assemble / link / run via clang still only works on Apple Silicon macOS with the CLI. File I/O is stubbed in the browser.

Local CLI

cargo run            # compile & run test_program.rs (macOS ARM64)
./build-web.sh       # rebuild WASM + public/ assets
python3 -m http.server -d public 8080