Brainfuck "compiler", written with Rust, macros and a splash of ❤️
cargo run
to executemain.rs
inline_bf! ( (Instance of rsfk_core::BrainfuckState) {BF instruction} )
use rsfk;
fn main() {
let mut bf = rsfk_core::BrainfuckState::<u32>::new();
rsfk::inline_bf!( (bf), { ++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++. } );
println!("{:?}", &bf);
}
// Hello World!
- Basic code
- Cargo upload
- Input fix (
ParseIntError { kind: InvalidDigit }
) - Test cases
- CI/CD on GitHub Action
- Separate Cargo/ GitHub branch
- Auto release onto Cargo when PR is merged to the branch
- Optimizations
- Repeated instructions into one function call
- Standalone bf compiler?
- Detailed control over the state of the machine?
- Preload memory
- Step execution (Possible?)