#brainfuck #esolang #parser #string-output

bf2s

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

2 releases

Uses new Rust 2024

0.1.1 Jul 26, 2025
0.1.0 Apr 4, 2025

#1328 in Parser implementations

32 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