brainfuck interpreter written in rust

Files
README.md

tachyon #

a brainfuck interpreter written in rust.

install #

pre-built binaries are available under tags.

download the archive for your platform, then:

# extract
tar xzf tachyon-<version>-<arch>.tar.gz

# (optional) move to somewhere on your PATH
mv tachyon ~/.local/bin/
archive platform
tachyon-*-aarch64-apple-darwin.tar.gz macOS (Apple Silicon)¹
tachyon-*-aarch64-linux-gnu.tar.gz Linux (ARM64)²
tachyon-*-x86_64-linux-gnu.tar.gz Linux (x86_64)²

¹ 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

² linux builds are untested as of right now! you have been warned!

alternatively, build from source:

cargo build --release

usage #

tachyon path/to/your/script.bf [OPTIONS]

use wrapping data pointer and raw i/o:

tachyon script.bf -d wrap -u raw

use raw input and ascii output:

tachyon script.bf -d wrap -i raw -o ascii

set a custom tape size of 100 cells:

tachyon script.bf -l 100

crash on cell overflow instead of wrapping:

tachyon script.bf -c error

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: 30,000)
-i, --input-type set input mode ascii (default), raw
-o, --output-type set output mode ascii (default), raw
-u, --io-type set both input and outtput ascii (default), raw
-t, --trace enable instruction tracing with optional delay in ms default: false, 0

roadmap #

features and milestones! nothing is guaranteed to happen. less of a roadmap and more a list of things i'd like to do

this is all pretty overkill but im using this project as a way to learn stuff

cli #

    • set data pointer & cell value behavior
    • set custom tape size

out-of-bounds behaviors #

    • error (default): crash when moving past tape boundaries
    • wrap: going out of bounds wraps around to start/beginning
    • wrap (default): 0 - 1 = 255
    • error: crash on overflow/underflow

better diagnostics #

visualization #

debugging #

maintenance #