balls - Brainfuck in Rust
Find a file
Max Bossing 07856d905e
Some checks failed
ci/woodpecker/tag/woodpecker Pipeline failed
init
2026-04-06 16:45:43 +02:00
examples init 2026-04-06 16:45:43 +02:00
resources init 2026-04-06 16:45:43 +02:00
src init 2026-04-06 16:45:43 +02:00
.gitignore init 2026-04-06 16:45:43 +02:00
.woodpecker.yaml init 2026-04-06 16:45:43 +02:00
Cargo.lock init 2026-04-06 16:45:43 +02:00
Cargo.toml init 2026-04-06 16:45:43 +02:00
LICENSE init 2026-04-06 16:45:43 +02:00
README.md init 2026-04-06 16:45:43 +02:00

balls - A brainfuck interpreter, transpiler, and framework

status-badge

Implementing brainfuck is one of my favourite excersises to do when starting out with a new language, but for some reason I've never implemented it in my favourite, Rust. So this is an attempt, hacked together in the passenger seat of a long drive with no internet. It has a tokenizer, a parser with a rudimentary optimizer and multiple backends (a direct interpreter in rust and a transpiler to c). Refer to resources for more information on the brainfuck language itself and to examples for some examples of brainfuck code.

Planned features

  • A compiler backend
  • Macros
  • A game framework
    • First 256 cells represent the screen (8x8, 256 color)
    • Next 6 cells represent user input (Up, Down, Right, Left, A, B)
    • Next cell for sounds (256 configurable sounds)

License

MIT