Project
bfcompiler
Full Brainfuck toolchain with compiler and REPL
Rust80Updated Jun 2026
Brainfuck compiler
This a simple implementation of a Brainfuck compiler in Rust, has several modes of operation, and can be used as a REPL.
Installation
1nix profile add github:4ster-light/bfcompilerIf on NixOS, you can also add it to your home-manager configuration.
1cargo install --git https://github.com/4ster-light/bfcompiler.gitUsage
Build
1bf build <FILE>If you want to save the intermediate Rust code representation, you can add the
--save flag:
1bf build <FILE> --save # or -sRun
You can run the file directly like any other interpreted language would with:
1bf run <FILE>Or you can use the REPL mode with:
1bf replAnd then you can enter your Brainfuck code, and it will be executed.
Example
You can find a file with this same code at the repository root called hello.bf, and you can run it with:
1bf run hello.bf1++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.2Hello World!License
MIT
Want to see more? Visit my GitHub profile for all of my repositories and contributions.
View all repositories on GitHub