···11# tachyon
22a brainfuck interpreter written in rust.
3344-## warning
55-my first rust project and my first interpreter.
66-bad code everywhere. you have been warned!
44+**warning!**: my first rust project and my first interpreter. bad code everywhere. you have been warned!
7588-## features
99-- standard 30,000 byte tape with configurable length.
66+# features
77+- standard 30,000 byte tape with configurable length, pre-filled with 0s.
108- **data pointer out-of-bounds behavior**: `error` (crash on bounds violation, default) or `wrap` (wrap around).
119- **cell value out-of-bounds behavior**: `wrap` (wrapping 8-bit, default) or `error` (crash on overflow/underflow).
1210- **ascii i/o** (default) and **raw 8-bit numeric i/o** for input and output.
1311- **syntax diagnostics**: catches unmatched brackets before execution.
1412- unit tests covering instructions, loops, nesting, out-of-bounds behaviors, and i/o modes.
15131616-## building
1414+# building
1715```bash
1816cargo build --release
1917```
20182121-## usage
1919+# usage
2220```bash
2321./target/release/tachyon [OPTIONS] <PATH>
2422```
25232626-### options
2727-| flag | description | values |
2828-|------|-------------|--------|
2929-| `-d`, `--data-oob` | data pointer out-of-bounds behavior | `error` (default), `wrap` |
3030-| `-c`, `--cell-oob` | cell value out-of-bounds behavior | `wrap` (default), `error` |
3131-| `-l`, `--length` | custom tape length | number (default: 30,000) |
3232-| `-i`, `--input-type` | input mode | `ascii` (default), `raw` |
3333-| `-o`, `--output-type` | output mode | `ascii` (default), `raw` |
3434-| `-p`, `--delay` | instruction delay in ms (pairs well with tracing) | default: `0` |
3535-| `-t`, `--tracing` | print tape state after every cycle | default: `false` |
3636-3724run a brainfuck script:
3825```bash
3926./target/release/tachyon path/to/your/script.bf
···5340```bash
5441./target/release/tachyon -c error script.bf
5542```
4343+4444+## options
4545+| flag | description | values |
4646+|------|-------------|--------|
4747+| `-d`, `--data-oob` | data pointer out-of-bounds behavior | `error` (default), `wrap` |
4848+| `-c`, `--cell-oob` | cell value out-of-bounds behavior | `wrap` (default), `error` |
4949+| `-l`, `--length` | custom tape length | number (default: 30,000) |
5050+| `-i`, `--input-type` | input mode | `ascii` (default), `raw` |
5151+| `-o`, `--output-type` | output mode | `ascii` (default), `raw` |
5252+| `-p`, `--delay` | instruction delay in ms (pairs well with tracing) | default: `0` |
5353+| `-t`, `--tracing` | print tape state after every cycle | default: `false` |
5454+5555+# roadmap
5656+features and milestones! nothing is guaranteed to happen. less of a roadmap and more a list of things i'd like to do
5757+5858+*this is all pretty overkill but im using this project as a way to learn stuff*
5959+6060+## cli
6161+- [x] **argument parsing**: possibly switch to `clap` for nicer cli experience
6262+- [x] **behavior flags**: overrides defaults in code (& possibly eventually in config?)
6363+ - set data pointer & cell value behavior
6464+ - set custom tape size
6565+- [x] **8-bit i/o**: add 8-bit input/output option alongside ascii default
6666+ - [ ] **monomorphization**: implement input/output strategy for minor optimization gains
6767+- [ ] **config file**: set up per-project config file for input & output
6868+6969+## out-of-bounds behaviors
7070+- [x] **data pointer behavior**
7171+ - `error` (default): crash when moving past tape boundaries
7272+ - `wrap`: going out of bounds wraps around to start/beginning
7373+- [x] **cell value behavior**
7474+ - `wrap` (default): 0 - 1 = 255
7575+ - `error`: crash on overflow/underflow
7676+7777+## better diagnostics
7878+- [x] **errors**: switch to `miette` for richer error display with source snippets
7979+- [x] **tracing**: cli flag to print state of vm/tape after every instruction
8080+8181+## visualization
8282+- [ ] **real-time cell visualization**: tui showing tape being adjusted and data pointer moving in real time at adjustable speed
8383+- [ ] **wasm**: compile to wasm for browser-based frontend?
8484+8585+## debugging
8686+- [ ] **step debugger**: REPL-style debugger with breakpoints, cell inspection, and instruction stepping
8787+8888+## maintenance
8989+- [ ] **comprehensive testing**: for all instructions and out-of-bounds behaviors
9090+- [ ] **benchmarking**: use `criterion` to track performance?
-36
ROADMAP.md
···11-# roadmap
22-features and milestones! nothing is guaranteed to happen. less of a roadmap and more a list of things i'd like to do
33-44-*this is all pretty overkill but im using this project as a way to learn stuff*
55-66-## cli
77-- [x] **argument parsing**: possibly switch to `clap` for nicer cli experience
88-- [x] **behavior flags**: overrides defaults in code (& possibly eventually in config?)
99- - set data pointer & cell value behavior
1010- - set custom tape size
1111-- [x] **8-bit i/o**: add 8-bit input/output option alongside ascii default
1212- - [ ] **monomorphization**: implement input/output strategy for minor optimization gains
1313-- [ ] **config file**: set up per-project config file for input & output
1414-1515-## out-of-bounds behaviors
1616-- [x] **data pointer behavior**
1717- - `error` (default): crash when moving past tape boundaries
1818- - `wrap`: going out of bounds wraps around to start/beginning
1919-- [x] **cell value behavior**
2020- - `wrap` (default): 0 - 1 = 255
2121- - `error`: crash on overflow/underflow
2222-2323-## better diagnostics
2424-- [x] **errors**: switch to `miette` for richer error display with source snippets
2525-- [x] **tracing**: cli flag to print state of vm/tape after every instruction
2626-2727-## visualization
2828-- [ ] **real-time cell visualization**: tui showing tape being adjusted and data pointer moving in real time at adjustable speed
2929-- [ ] **wasm**: compile to wasm for browser-based frontend?
3030-3131-## debugging
3232-- [ ] **step debugger**: REPL-style debugger with breakpoints, cell inspection, and instruction stepping
3333-3434-## maintenance
3535-- [ ] **comprehensive testing**: for all instructions and out-of-bounds behaviors
3636-- [ ] **benchmarking**: use `criterion` to track performance?