yabf_rs
is a simple crate that can be used to embed Brainfuck programs into your Rust programs.
Documentation on docs.rs
- Can parse and execute Brainfuck code.
- Highly customizable IO system.
- Allows you to inspect/modify data about your program during runtime.
The following program outputs the letter 'H' to the terminal.
use yabf_rs::*;
fn main() {
let program = Program::from(">++++++++[<+++++++++>-]<.");
let mut bf = BfInstance::from(program);
bf.run(&mut default_input_source, &mut default_flush);
}
For more examples, look at the examples directory in the repository.
- Install Rust from https://www.rust-lang.org/
- Install Git from https://git-scm.com/
git clone https://github.com/serd223/yabf
cd yabf
cargo run --example hello_world
- yabf_cli is a simple command line tool for debugging/running Brainfuck code.
cargo add yabf_rs
yabf was already taken...