skeeto / bf-x86

x86_64 brainfuck compiler
The Unlicense
36 stars 4 forks source link

x86_64 Brainfuck Compiler

bf-x86 compiles brainfuck programs directly into tiny, position-independent x86_64 Linux ELF programs. The resulting ELF doesn't link to any standard libraries, instead making raw syscalls. It can optionally execute the compiled program directly in memory like a JIT-compiler.

The compiler employs a peephole optimizer to produce compiled programs that run quickly and efficiently.

Usage

$ bf-x86 -o hello hello.bf
$ ./hello
Hello, world!

Additional Resources