A Rust implementation of the Hack assembler, VM parser, and compiler for the nand2tetris course.
This repository will be organized into separate packages for each part:
assembler: Hack assembly language to machine codevm: VM code parser and translatorcompiler: High-level language compiler
- Assembles Hack assembly language (.asm) files
- Parses and processes VM code (.vm files)
- Will include a compiler for higher-level language support
- Command-line interface
Build the project:
cargo build --releaseRun the assembler:
cargo run --release -- <input.asm> [output.hack]<input.asm>: Path to the Hack assembly file[output.hack]: Optional output file path (defaults to input filename with .hack extension)
cargo run --release -- examples/Add.asm- Rust (https://rust-lang.org)
MIT