brainfuck interpreter
brainfuck cli rust
5

Configure Feed

Select the types of activity you want to include in your feed.

74 4 2

Clone this repository

https://tangled.org/digi.rip/tachyon https://tangled.org/did:plc:einebxrxfych2slzq7soxsyb
git@tangled.org:digi.rip/tachyon git@tangled.org:did:plc:einebxrxfych2slzq7soxsyb

For self-hosted knots, clone URLs may differ based on your setup.



README.md

tachyon#

a brainfuck interpreter written in rust.

warning#

my first rust project and my first interpreter. bad code everywhere. you have been warned!

features#

  • standard 30,000 byte tape with configurable length.
  • data pointer out-of-bounds behavior: error (crash on bounds violation, default) or wrap (wrap around).
  • cell value out-of-bounds behavior: wrap (wrapping 8-bit, default) or error (crash on overflow/underflow).
  • ascii i/o (default) and raw 8-bit numeric i/o for input and output.
  • syntax diagnostics: catches unmatched brackets before execution.
  • unit tests covering instructions, loops, nesting, out-of-bounds behaviors, and i/o modes.

building#

cargo build --release

usage#

./target/release/tachyon [OPTIONS] <PATH>

options#

flag description values
-d, --data-oob data pointer out-of-bounds behavior error (default), wrap
-c, --cell-oob cell value out-of-bounds behavior wrap (default), error
-l, --length custom tape length number (default: 30000)
-i, --input-type input mode ascii (default), raw
-o, --output-type output mode ascii (default), raw

run a brainfuck script:

./target/release/tachyon path/to/your/script.bf

use wrapping data pointer and raw i/o:

./target/release/tachyon -d wrap -i raw -o raw script.bf

set a custom tape size of 100 cells:

./target/release/tachyon -l 100 script.bf

crash on cell overflow instead of wrapping:

./target/release/tachyon -c error script.bf