Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aadhavr/bf-interpreter
https://github.com/aadhavr/bf-interpreter
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/aadhavr/bf-interpreter
- Owner: aadhavr
- Created: 2024-08-13T07:56:05.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-08-19T03:10:44.000Z (5 months ago)
- Last Synced: 2024-08-19T04:27:13.046Z (5 months ago)
- Language: Zig
- Size: 6.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Zig Brainfuck Interpreter
This repository contains a Brainfuck interpreter written in Zig. It allows you to run Brainfuck code, a programming language with eight commands.
## *Update*
I've been trying to run some more complicated Brainfuck programs and the interpreter is facing issues. Have gotten stuck with debugging and will revisit later. Seems to run pretty basic programs that don't involve complex loops though.
## Features
- Interpret and execute Brainfuck code.
- Handle dynamic memory allocation for Brainfuck's tape.
- Input and output operations as specified by Brainfuck's design.## Getting Started
### Prerequisites
- Install [Zig](https://ziglang.org/download/) on your system.
### Building the Project
To build the interpreter, run the following command in the root of the project:
```bash
zig build-exe src/main.zig
```### Usage
To run a Brainfuck program, use the executable generated from the build process:
```bash
./main < path/to/your/brainfuck_program.bf
```Or you can directly input the Brainfuck code:
```bash
echo "++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>." | ./main
```## Contributing
Contributions are welcome! If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
## Licensing
This project is licensed under the MIT License.