#brainfuck #esolang #parser #string-output

bf2s

A simple Brainfuck interpreter that executes code from a string and returns the output as a string

1 unstable release

Uses new Rust 2024

0.1.0 Apr 4, 2025

#1228 in Parser implementations

30 downloads per month
Used in wopt

MIT license

5KB
89 lines

bf2s (Brainfuck-to-string)

Usage

fn main() {
    let code = "
        -[------->+<]>-.-[->+++++<]>
        ++.+++++++..+++.[->+++++<]>+
        .------------.---[->+++<]>.-
        [--->+<]>---.+++.------.----
        ----.-[--->+<]>.
    ";
    let s = bf2s::bf_to_str(code);
    assert_eq!(s, "Hello, World!")
}

No runtime deps