Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/writeonlycode/vm-translator
An implementation of the VM Translator from the 'Nand to Tetris' course, written in Rust!
https://github.com/writeonlycode/vm-translator
nand2tetris nand2tetris-vm-translator
Last synced: about 2 months ago
JSON representation
An implementation of the VM Translator from the 'Nand to Tetris' course, written in Rust!
- Host: GitHub
- URL: https://github.com/writeonlycode/vm-translator
- Owner: writeonlycode
- Created: 2024-08-08T18:13:22.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-08T18:18:50.000Z (5 months ago)
- Last Synced: 2024-08-08T21:05:28.104Z (5 months ago)
- Topics: nand2tetris, nand2tetris-vm-translator
- Language: Rust
- Homepage:
- Size: 184 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![](https://github.com/writeonlycode/vm-translator/blob/e21a496c509578e3433938602ab4a0607381157d/Screenshot%20from%202024-08-08%2015-15-37.png)
# VM Translator in Rust
This project is an implementation of the VM Translator from the 'Nand to
Tetris' course, written in Rust!The architecture of the assembler follows a functional approach: mostly
functions doing the heavy work, not relying on objects, and trying to use
mostly immutable variables. However, a few mutable references are used when it
makes everything easier.The entire implementation is done in just over 300 lines of code!
## Usage
```bash
cargo run -- path/to/filename.vm
```If `filename.vm` is a valid program, a `filename.asm` file that can be
executed by the Hack computer will be generated!# References
- [From Nand to Tetris: Building a Modern Computer From First Principles](https://www.nand2tetris.org/)