Ahead-of-Time (AOT) compiler for Brainfuck, written in Rust.
why did i dedicate so much time to making a stupid brainfuck aot compiler bruh
# if you used other compilers like gcc/clang, etc. before, the cli syntax should be familiar to you.
# help command
brainfuckc -h
# shell completions
brainfuckc completions <SHELL>
# example compile with optimisation level 3
brainfuckc source_code.bf -o source_code -O3in order of priority
- other linker support for extra compatibility (like ld, lld, etc)
- more optimizations like dce and stuff
brainfuck-rs is a high performance AOT compiler for Brainfuck, written in Rust.
- Focus on high performance
- Ahead-of-Time (AOT) compilation
- Multiple backends (cranelift, llvm, etc.) (note that this is TBC, currently only cranelift is supported)
- Multiple linkers (gcc/clang, ld, lld, etc.) (note that this is TBC, currently only gcc and clang are supported)
- Multiple optimizations (constant folding, dead code elimination, etc.) (more optimizations to be added)
install requirements:
- rust (1.85.0 or later) (stable is preferred)
usage requirements:
- a linker (gnu or clang supported only (for now...))
install steps:
git clonethis repocargo build --releasecd crates/bin/brainfuckc && cargo install --path .(this will install the binary to your cargo bin path if you want)
This project is licensed under the MIT License - see the LICENSE file for details.