Skip to content

jenia90/nand2tetris-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nand2tetris-rust

A Rust implementation of the Hack assembler, VM parser, and compiler for the nand2tetris course.

Project Structure

This repository will be organized into separate packages for each part:

  • assembler: Hack assembly language to machine code
  • vm: VM code parser and translator
  • compiler: High-level language compiler

Features

  • 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

Usage

Build the project:

cargo build --release

Run 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)

Example

cargo run --release -- examples/Add.asm

Requirements

License

MIT

About

Implementation of the nand2tetris assembler, vm and compiler in Rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published