Skip to content

K-C-DaCosta/Brainfrusk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brainfrusk

A brainfuck interpreter(and maybe compiler eventually) written in Rust

Example (prints hello world )

    let source = r"++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<]<-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.";
    let mut tokens = brainfrusk::Instruction::parse_str(source);
    let mut memory = vec![0u8; 1024];
    brainfrusk::Interpreter::new()
        .with_instruction_buffer(&mut tokens)
        .with_memory(&mut memory)
        .run();

Running Mandlebrot example

cargo run --example=mandelbrot --release

About

Yet another brainf*ck interpreter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages