mindblown

A brainf**k to x86 ELF compiler written in Rust meant for Linux and Windows under WSL. Codegen is made from brainf**k directly to x86 Intel assembly without any IR. Most of the optimization work is done when parsing, so an integrated interpreter can benefit from it too.

This is in a very early state. Stay tuned for more features and optimizations like the ones described in TODO.

Note: samples/patterns.py was solely used for detecting common loop patterns in classical brainf**k programs for present and future refactoring.

Table of Contents

Prerequisites

Getting started

  1. Get the latest binary release installed on your machine ```sh

    Get the latest cargo release

$ cargo install mindblown

Build from source

$ git clone https://github.com/Noxtal/mindblown.git $ cd mindblown $ cargo build --release ```

  1. Use the mindblown command to compile your brainf**k program ```sh $ mindblown

    The resulting binary will be named as the input program BUT without extension

$ chmod +x $ ./ ```

(<OUTPUT>, )

YOU ARE NOW READY TO USE MINDBLOWN! 🎉

Debug using the integrated interpreter

bash $ mindblown

Note: The integrated interpreter uses the snailquote syntax for input. Please refer to their documentation for more information.

Inspiration

TODO