Skip to content

Kirchoffs/brainfuck-rust

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

brainfuck-rust

Definition

From Wikipedia

Brainfuck command C equivalent
(Program Start) char array[30000] = {0};
char *ptr = array;
> ptr++;
< ptr--
+ *ptr++;
- *ptr--;
. putchar(*ptr);
, *ptr = getchar()
[ while (*ptr) {
] }

Run the code

Install and use nightly version

>> rustup toolchain list
>> rustup toolchain install nightly
>> rustup default nightly

Run the code

>> cargo build
or
>> cargo build --release

>> cargo run --bin vanilla -- resources/hello_world.bf
>> cargo run --bin ir -- resources/hello_world.bf
>> cargo run --bin jit -- resources/hello_world.bf
or
>> cargo run --bin jit --release -- resources/mandelbrot.bf

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published