/brainrust

A Brainfuck interpreter written in Rust

Primary LanguageRustMIT LicenseMIT

Brainrust

Brainrust is a Brainfuck interpreter written in Rust.

Building

Brainrust can be built using the Rust nightly binaries.

$ git clone https://github.com/JustAPerson/brainrust.git
$ cd brainrust
$ cargo build

Usage

Brainrust is pretty straightforward to use. If given a file name argument, then it will interpret that file's contents or else it will operate as a REPL.

$ cat > hello_world.b
++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>
---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.
$ cargo run hello_world.b
Hello World!

Caveats

The input operator , does not work correctly in the REPL mode because Rust is currently unable to provide unbuffered access to stdin.

License / Copyright

Brainrust is available under the terms of the MIT license. See LICENSE.md for details.