| Crates.io | crain |
| lib.rs | crain |
| version | 0.1.0 |
| created_at | 2025-07-14 11:46:50.433949+00 |
| updated_at | 2025-07-14 11:46:50.433949+00 |
| description | A Brainfuck compiler/interpreter/tool |
| homepage | |
| repository | https://crates.io/crates/crain |
| max_upload_size | |
| id | 1751553 |
| size | 35,715 |
Crain -- A brainfuck compiler/interpreter/tool.
++++ +++++ +[ - > +
+ + + + + > - -> +
+ + < < < ] > + +
+ ++++. [->++> + < < ]
> . > . < - - - --
---- . + + + + + .
Crain is a brainfuck compiler/interpreter/development tool written in Rust, dedicated to providing a fast, reliable, and ready-to-use execution environment for brainfuck programs.
Fast: Leveraging Rust's high performance and Crain's optimizations, Crain can quickly interpret and execute brainfuck programs.
Ready to use: Crain is designed to allow users to write brainfuck programs with minimal configuration and manual code modifications.
Highly configurable: Crain offers a wealth of configuration options, suitable for many brainfuck codes that require special configurations, and even some brainfuck variants.
Cross-platform support: Crain can be compiled and run on multiple operating systems, including Linux, macOS, and Windows.
Tip: Some features will be available in future versions.
Thanks to Rust's powerful package manager, you can install Crain directly via Cargo:
cargo install crain
Make sure you have Rust and Cargo installed on your system.
To run a brainfuck program:
crain run crain/example/crain.bf
You can also provide code via command-line arguments:
crain run --string ",[.,]"
For more information, you can consult the help documentation:
crain --help
Crain is licensed under the MIT License - see the LICENSE file for more details.
However, the brainfuck code in the example folder is licensed under the WTFPL License. See NOTICE for more information.
Brainfuck wiki: https://esolangs.org/wiki/brainfuck