Skip to content

br41nlet/brainfuck-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Rustfuck


Description


Basic Brainfuck interpeter written in Rust.

The main purpose for this project is intension to learn Rust language.




Instructions


RF Instruction Description
> MoveRight Move pointer to the right
< MoveLeft Move pointer to the left
+ IncrementValue Increment memory cell at the pointer
- DecrementValue Decrement memory cell at the pointer
. Output Print value of the pointed memory cell to stdout
, Input Input a character and store it in the cell at the pointer
[ OpenLoop Indicates loop beginning
] CloseLoop Indicates loop ending
ExecuteLoopBody(Vec) Execute instructions inside loop brackets
Ignore Every other character is ignored by interpreter



Roadmap


1.0

  • Basic working interpreter
  • Reading code from file

1.1

  • Contract optimization
  • Clearloop optimization
  • [x] Copyloop optimization
  • [x] Multiloop optimization
  • Diophantine loop optimization
  • Scanloop optimization
  • Offsetops optimization
  • Nested Diophantine loops optimization

1.2

  • Extended Stein's Algorithm optimization
  • u16 and u32 memory cells
  • Custom memory tape length
  • Tests

2.0

  • 2DFuck implementation

About

Highly optimized ⚙️ Rust implementation of 🧠 Brainfuck interpreter

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages