#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

new 0.1.0 Apr 4, 2025

#33 in #brainfuck-interpreter

Download history 93/week @ 2025-03-30

93 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