| Crates.io | breakfast |
| lib.rs | breakfast |
| version | 0.1.4 |
| created_at | 2025-04-18 09:54:23.225371+00 |
| updated_at | 2025-06-01 08:07:45.964235+00 |
| description | A Brainfuck interpreter in Rust |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1639142 |
| size | 7,838 |
Breakfast is a minimal brainfuck (BF for short) interpreter in Rust.
It offers most of the suggested BF features, including multiple EOF behaviors and # for debug purposes.
Here is a simple piece of code to run the “Hello World” BF program:
use breakfast::*;
fn main() -> std::io::Result<()> {
let program = Breakfast::parse(
r#"
>++++++++[<+++++++++>-]<.
>++++[<+++++++>-]<+.
+++++++..
+++.
>>++++++[<+++++++>-]<++.
------------.
>++++++[<+++++++++>-]<+.
<.
+++.
------.
--------.
>>>++++[<++++++++>-]<+.
"#
);
let mut bf = Breakfast::new(Default::default());
bf.run(program)?;
Ok(())
}