A Brainf** interpreter written in rust 🦀

Overview

Brainf Interpreter

An interpreter for the esoteric programming language Brainfuck written in rust 🦀

Compilation

NOTE: To compile the project, you need to have rust installed. Check how to do it here.

git clone https://github.com/chitramdasgupta/brainf-interpreter.git
cd brainf-interpreter
cargo build --release

Running

The repository includes a number of code samples written in Brainfuck in examples/

To run one of them:

./target/release/brainf_interpreter ./examples/hello.bf

This will print Hello World!

You might also like...
Risc-V assembly interpreter built with pure Rust
Risc-V assembly interpreter built with pure Rust

Risc-V Interpreter Interpreter for Risc-V assembly built with Rust Report bug · Request feature Table of contents Quick start Exemple Program Instruct

This crate defines a single macro that is a brainfunct compile-time interpreter.

Compile Protection This crate defines a single macro that is a brainfunct compile-time interpreter. One example is as follows #![recursion_limit = "18

Compiler & Interpreter for the (rather new and very experimental) Y programming language.

Y Lang Why would anyone build a new (and rather experimental) language with no real world use case. Design Y (pronounced as why) is based on the idea

PICNIC Is Config Notation Interpreter/Converter
PICNIC Is Config Notation Interpreter/Converter

PICNIC Is Config Notation Interpreter/Converter 🦀 PICNIC PICNIC's name is powered by AI, which immediately makes it worth your time: Human: Please co

A highly modular Bitcoin Lightning library written in Rust. Its Rust-Lightning, not Rusty's Lightning!

Rust-Lightning is a Bitcoin Lightning library written in Rust. The main crate, lightning, does not handle networking, persistence, or any other I/O. Thus, it is runtime-agnostic, but users must implement basic networking logic, chain interactions, and disk storage. More information is available in the About section.

A language server for lua written in rust

lua-analyzer lua-analyzer is a lsp server for lua. This is mostly for me to learn the lsp protocol and language analysis so suggestions are helpful. T

Opensource diagnostic software for Daimler vehicles, inspired by Xentry and DAS, written in Rust

OPENSTAR An opensource diagnostic application for Daimler vehicles inspired by DAS and Xentry. Some of the work here is based on OpenVehicleDiag If yo

Benchmarking web frameworks written in rust with rewrk tool.

Web Framework Benchmarks Benchmarking web frameworks written in rust with rewrk tool.

Yet another ROS2 client library written in Rust
Yet another ROS2 client library written in Rust

RclRust Target CI Status Document Foxy (Ubuntu 20.04) Introduction This is yet another ROS2 client library written in Rust. I have implemented it inde

Comments
  • Added brackets check, `from` constructor, and simplified execution

    Added brackets check, `from` constructor, and simplified execution

    Added the from function for when you want to initialize the Machine with a specified length for the data_tape. Implemented a brackets check while parsing the file: now brackets are matched in pairs and an error is returned if some are mismatched. Simplified adds and subs. Simplified jumping between brackets. Now parse_instructions resets values to support multiple executions.

    opened by Princic-1837592 6
  • Should `data_pointer` be wrapped around the length of `data_tape`?

    Should `data_pointer` be wrapped around the length of `data_tape`?

    I found out that using wrapping_add and wrapping_sub is not totally safe here because subtracting below 0 is not actually goind to data_tape - 1 but to 18446744073709551615, which is the max value for usize (and definitely out of range for data_tape). Is it ok to leave it like this?

    opened by Princic-1837592 3
  • Condense multiple `>`, `<`, `+` and `-` instructions into one

    Condense multiple `>`, `<`, `+` and `-` instructions into one

    Currently, a sequence of >, <, + and - instructions execute one by one. It would be much better if the sequence could be executed as a batch at one go. For example:

    >>>> can be parsed as 4 data_pointer increments at one go instead of increment by one to be performed 4 times.

    enhancement good first issue 
    opened by chitramdasgupta 0
Owner
Chitram Dasgupta
curious person
Chitram Dasgupta
An optimising Brainf*ck to x86-64 assembly compiler written in Rust

brainfrsk 2 An optimising Brainf*ck to x86-64 assembly compiler. This compiler can produce optimised binaries for macOS (Sytem V calling convention) b

Adam Soutar 1 Feb 20, 2022
An example of Brainf*** JIT-compiler with only the standard library.

jit-compiler An example of Brainf*** JIT-compiler with only the standard library. Prerequisite Rust(1.56.0-nightly or later, but it must work kind of

Akihito KIRISAKI 18 Jan 22, 2022
🤯 A brainf*ck-style programming language, but readable

?? Brainease Brainease is a brainf*ck-style programming language, but readable. $ cargo install brainease # brainease -f examples/hello.bz save 'H

Arthur Fiorette 11 Sep 30, 2022
Brainfuck interpreter written in rust

Brainfuck Interpreter Written in Rust Simple Interpreter that runs bare Brainfuck and extends it with debug command # which prints content of first te

Was 1 Nov 28, 2021
The brainfuck language interpreter written in Rust

The brainfuck language interpreter written in Rust

Jan Å taffa 1 Feb 21, 2022
Brainfu*k interpreter and REPL written in Rust🦀

brainfuck interpreter: a simple brainfuck interpreter and REPL writen in rust ?? Read this in other languages. AR Arabic-العربية Features Run brainfuc

Anas Elgarhy 7 Feb 1, 2023
A fast, powerful and configurable interpreter written in Rust

brainfuck-interpreter Overview A fast, powerful and configurable interpreter written in Rust, which allows various options to meet different demends,

Justin Chen 4 Feb 12, 2023
A simple interpreter written in Rust programming language.

Interpreter in Rust A simple interpreter written in Rust programming language. Getting Started These instructions will get you a copy of the project u

Ismail Mosleh 5 Feb 17, 2023
Regorus - Rego interpreter, analyzer and validator written in Rust

regorus THIS REPOSITORY IS IN ACTIVE DEVELOPMENT AND NOT INTENDED FOR PRODUCTION USE. Regorus is a Rego interpreter, analyzer and checker written in R

Microsoft 13 Mar 2, 2023
rlox-interpreter is an AST-walking implementation of Bob Nystrom's Lox language in Rust.

rlox-interpreter rlox-interpreter is an AST-walking implementation of Bob Nystrom's Lox language in Rust. Disclaimer: This is my first Rust project, d

Paul Fedorow 3 Oct 5, 2022