Expand description
Brainfuck interpreter
§Example
use brainfck::Interpreter;
let hello_world = b">+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]
>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++
.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.";
let input = core::iter::empty();
let mut out = Vec::new();
let mut interpreter = Interpreter::new(hello_world, input, &mut out);
interpreter.run().unwrap();
assert_eq!(out, b"Hello world!\n");
Structs§
- Interpreter
- Interpreter for a brainfuck program
- NoOutput
- A dummy Writer that ignores the input and always returns Ok
Enums§
- Error
- Signals an error on the interpreter
Traits§
- Writer
- Wrapper trait of
std::io::Read
forno_std
enviroments.