#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

#382 in WebAssembly

Download history 7/week @ 2024-01-16 1/week @ 2024-02-13 8/week @ 2024-02-20 35/week @ 2024-02-27 2/week @ 2024-03-05 3/week @ 2024-03-12 3/week @ 2024-03-26 41/week @ 2024-04-02 1/week @ 2024-04-23 116/week @ 2024-04-30

117 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.5–2MB
~32K SLoC