/vm-translator-rust

VMTranslator using rust for nand2tetris

Primary LanguageRust

VM Translator in Rust

GitHub last commit GitHub code size in bytes

This repository contains a Rust implementation of the VM Translator for the Hack computer, as described in Chapter 7 of the Nand to Tetris course. With this VM Translator, you can translate VM code into Hack Assembly Language code.

Prerequisites

Rust is required to build and run this VM Translator. If you don't have Rust installed, you can get it from the official Rust website.

Installation

To build and use this VM Translator, you can clone this repository and build it using Cargo:

git clone https://github.com/cuspymd/vm-translator-rust.git
cd vm-translator-rust
cargo build

Usage

You can translate VM code to Hack Assembly Language code using the following command:

cargo run input.vm

This will generate an input.asm file in the same directory as your input VM code (input.vm).