A simple brainf*** jit compiler which generates x64 instructions on the fly and then executes the code. Currently only working on windows.
To use the brainf jit compiler you have to do the following steps
- Get brainf jit compiler
- Build from source
- Run
- Run the command
git clone https://github.com/fuzesmarcell/brainfuck_jit.git
cd brainfuck_jit/code
- Run
build.bat
NOTE: The build.bat
script on Windows expects to find cl
(MSVC). Your environment should know about this. The easiest way to do this is to use one of the Visual Studio command prompts (titled x64 Native Tools Command Prompt for VS<version>
, or x86 Native Tools Command Prompt for VS<version>
). Otherwise, you can call vcvarsall.bat
in your terminal environment, which is packaged with Visual Studio.
- To run a brainf program simply execute the command in the build directory
brainf_jit brainfsource.b
- You can specify different parameters with addtional command line arguments. Simply run
brainf_jit
and the usage will be printed
NOTE: The -cellsize option currently is not working and can be only 64-bit.
In the examples
directory you will find some brainf programms you can try out.