This is a simple interpreter for the Brainf*ck programming language, implemented in Rust. The project was created around 2020/2021 as a learning endeavor to practice Rust programming and to gain a better understanding of how interpreters work. While it is unlikely to receive updates in the future, it is not impossible.
- Parses Brainf*ck code from a file.
- Executes Brainf*ck instructions.
- Supports all standard Brainf*ck commands:
>
,<
,+
,-
,.
,,
,[
,]
.
To run this project, you need to have Rust installed on your machine. Once you have Rust set up, you can clone the repository and build the project.
git clone https://github.com/dev-diego-fully/brain-rusted.git
cd brain-rusted
cargo build --release
After building the project, you can run the interpreter by passing the path to a Brainf*ck program as an argument:
cargo run path/to/your/brainf_ck_program.bf
Here is a simple Brainf*ck program that prints "Hello, World!" when executed:
>++++++++[<+++++++++>-]<.
>++++[<+++++++>-]<+.
+++++++..
+++.
>>++++++[<+++++++>-]<++.
------------.
>++++++[<+++++++++>-]<+.
<.
+++.
------.
--------.
>>>++++[<++++++++>-]<+.
Save this code in a file (e.g., hello.bf
) and run it with the interpreter:
cargo run hello.bf
Contributions are welcome! Feel free to open issues or submit pull requests.
This project is licensed under the GPLv3 License. See the LICENSE file for more details.