https://github.com/deciduously/bfrs
Brainfuck interpreter in Rust
https://github.com/deciduously/bfrs
brainfuck rust
Last synced: 4 months ago
JSON representation
Brainfuck interpreter in Rust
- Host: GitHub
- URL: https://github.com/deciduously/bfrs
- Owner: deciduously
- License: mit
- Created: 2017-03-11T20:05:36.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2018-04-07T16:59:07.000Z (about 8 years ago)
- Last Synced: 2026-01-24T18:51:52.945Z (4 months ago)
- Topics: brainfuck, rust
- Language: Rust
- Homepage:
- Size: 67.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# BFRS
[](https://travis-ci.org/deciduously/bfrs)
Quick 'n dirty [BrainFuck](https://en.wikipedia.org/wiki/Brainfuck) interpereter in Rust.
## Dependencies
Rust 1.25.0 or higher (I jumped on those nested import groups). Or download the 64-bit Linux binary from [releases](https://github.com/deciduously/bfrs/releases).
## Usage
`bfrs` accepts a brainfuck file as its first argument, and optionally a second argument of either `-d` or `--debug` to dump machine state after each instruction, which is obnoxious. For example: `bfrs resource/benchmark.b -d`.
## Development
Use [cargo](https://doc.rust-lang.org/stable/cargo) run, test, install, --release, etc.
## Performance
Middling.
On my machine (AMD A10-5750M) it runs `benchmark.b` in 6.66 seconds and [`mandel.b`](https://github.com/kostya/benchmarks/blob/master/brainfuck2/mandel.b) in 95.02 seconds.
First stab at it was even worse, 13.21 and 221.16 respectively, so, you know, gainz.
## Acknowledgements
This [crazy page](http://www.hevanet.com/cristofd/brainfuck/) from this [crazy guy](http://www.hevanet.com/cristofd/brainfuck/daniel.png). Thanks, Cristof. He wrote the sierpinksi one and some of the other tests I've been using.
Benchmark and Mandlebrot programs yanked from [kostya](https://github.com/kostya/benchmarks).