3 stable releases
2.0.0 | Jan 17, 2024 |
---|---|
1.1.0 | Sep 19, 2023 |
1.0.0 | Sep 19, 2023 |
#832 in WebAssembly
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.2–1.9MB
~28K SLoC