Brainfu*k interpreter and REPL written in Rust🦀
Find a file
2022-10-13 19:58:02 +02:00
.idea Improve the arguments 🦀 2022-10-13 18:47:28 +02:00
assets Fix interpreter repl errors and add some tsests and create the base 2022-10-08 22:11:13 +02:00
screenshots Fix interpreter repl errors and add some tsests and create the base 2022-10-08 22:11:13 +02:00
src Improve the repl 🥰 2022-10-13 19:58:02 +02:00
test_code Fix repl yoooooooooooooooo ❤ 2022-10-13 14:23:46 +02:00
.gitignore Improve gitignore file 🥰 2022-10-08 08:16:21 +02:00
Cargo.toml Improve the arguments 🦀 2022-10-13 18:47:28 +02:00
LICENSE-MIT.txt Add WTFPL license 🤪 2022-10-13 17:18:07 +02:00
LICENSE.txt Add WTFPL license 🤪 2022-10-13 17:18:07 +02:00
README.md Improve 💙 2022-10-12 19:29:53 +02:00

brainfuc*k interpreter

brainfuck interpreter: a simple brainfuck interpreter and REPL writen in rust 🦀

Install

  • from crates.io
    cargo install bf-interpreter
    
  • From aur:
    yay -S bf-interpreter
    

Options and arguments

bf-interpreter --help
Brainfu*k interpreter and REPL written in Rust

Usage: bf-interpreter [OPTIONS] [SOURCE]

Arguments:
  [SOURCE]
          The brainfuck source code file to run (if not will be entered in REPL mode)

Options:
  -f, --features <FEATURES>
          Possible values:
          - reverse-counter:
            If the value is you want decrement the value and the value is 0, set the value to 255, otherwise decrement the value. If the value is you want increment the value and the value is 255, set the value to 0, otherwise increment the value
          - reverse-pointer:
            If the pointer at the end of the array, set the pointer to 0, otherwise increment the pointer. If the pointer at the beginning of the array, set the pointer to the end of the array, otherwise decrement the pointer

  -a, --array-size <ARRAY_SIZE>
          The brainfuck array size
          
          [default: 30000]

  -w, --without-tiles
          Dont print the tiles (e.g. exit code, file name, etc)

  -h, --help
          Print help information (use `-h` for a summary)

  -V, --version
          Print version information

Examples

bf-interpreter test_code/hello_world.bf
Hello world!
Successfully ran brainfuck source code from file: test_code/hello_world.bf
Exiting with code: 0
bf-interpreter -w test_code/hello_world.bf
Hello world!
bf-interpreter test_code/print_hi_yooo.bf
Hi yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!Successfully ran brainfuck source code from file: test_code/print_hi_yooo.bf
Exiting with code: 0
bf-interpreter -w test_code/print_hi_yooo.bf
Hi yoooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo!
bf-interpreter test_code/like_cat.bf

output