balls - Brainfuck in Rust
- Rust 100%
|
|
||
|---|---|---|
| examples | ||
| resources | ||
| src | ||
| .gitignore | ||
| .woodpecker.yaml | ||
| Cargo.lock | ||
| Cargo.toml | ||
| LICENSE | ||
| README.md | ||
balls - A brainfuck interpreter, transpiler, and framework
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)