#interpreter #esoteric #library #brainfk

yabfr

⚡blazingly fast brainf**k interpreter made in rust (yet another brainf**k _in_ rust)

3 stable releases

2.0.0 Jan 17, 2024
1.1.0 Sep 19, 2023
1.0.0 Sep 19, 2023

#425 in WebAssembly

44 downloads per month

LGPL-3.0

9KB
143 lines

yabfr (yet another brainf**k in rust)

blazingly fast brainf**k interpreter made in rust

usage

wasm:

npm install yabfr
import { run } from "yabfr";

const output = run("brainf**k program");

console.log(output);

rust

use yabfr::run;

let output = run("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.");

println!("{}", output)

lib.rs:

welcome to yabfr docs!

what does this crate do?

with this crate, you can execute a brainf**k program with a nice and simple rust API.

features

  • execute a brainf**k program from a string

examples

use yabfr::run;

let output = run("++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.");

println!("{}", output)

"issues"

  • currently, there is no way to pass in "input" to the interpreter, will be fixed later hopefully

Dependencies

~1.3–2MB
~31K SLoC