···11# tachyon
22a brainfuck interpreter written in rust.
3344-**warning!**: my first rust project and my first interpreter. bad code everywhere. you have been warned!
44+# install
5566-# features
77-- standard 30,000 byte tape with configurable length, pre-filled with 0s.
88-- **data pointer out-of-bounds behavior**: `error` (crash on bounds violation, default) or `wrap` (wrap around).
99-- **cell value out-of-bounds behavior**: `wrap` (wrapping 8-bit, default) or `error` (crash on overflow/underflow).
1010-- **ascii i/o** (default) and **raw 8-bit numeric i/o** for input and output.
1111-- **syntax diagnostics**: catches unmatched brackets before execution.
1212-- unit tests covering instructions, loops, nesting, out-of-bounds behaviors, and i/o modes.
66+pre-built binaries are available under [tags](https://tangled.sh/@digi.rip/tachyon/tags).
1371414-# building
88+download the archive for your platform, then:
99+1510```bash
1616-cargo build --release
1111+# extract
1212+tar xzf tachyon-<version>-<arch>.tar.gz
1313+1414+# (optional) move to somewhere on your PATH
1515+mv tachyon ~/.local/bin/
1716```
18171919-# usage
1818+| archive | platform |
1919+|---------|----------|
2020+| `tachyon-*-aarch64-apple-darwin.tar.gz` | macOS (Apple Silicon)¹ |
2121+| `tachyon-*-aarch64-linux-gnu.tar.gz` | Linux (ARM64)² |
2222+| `tachyon-*-x86_64-linux-gnu.tar.gz` | Linux (x86_64)² |
2323+2424+¹ if macOS complains about not being able to open the binary due to lack of developer verification, run: `xattr -d com.apple.quarantine path/to/tachyon`
2525+2626+² linux builds are untested as of right now! you have been warned!
2727+2828+alternatively, build from source:
2029```bash
2121-./target/release/tachyon <PATH> [OPTIONS]
3030+cargo build --release
2231```
23322424-run a brainfuck script:
3333+# usage
2534```bash
2626-./target/release/tachyon path/to/your/script.bf
3535+tachyon path/to/your/script.bf [OPTIONS]
2736```
28372938use wrapping data pointer and raw i/o:
3039```bash
3131-./target/release/tachyon script.bf -d wrap -i raw -o raw
4040+tachyon script.bf -d wrap -i raw -o raw
3241```
33423443set a custom tape size of 100 cells:
3544```bash
3636-./target/release/tachyon script.bf -l 100
4545+tachyon script.bf -l 100
3746```
38473948crash on cell overflow instead of wrapping:
4049```bash
4141-./target/release/tachyon script.bf -c error
5050+tachyon script.bf -c error
4251```
43524453## options