Brainfk-rs: A brainfuck to WebAssembly compiler written in Rust

brainfk-rs started out as a exploration into WebAssembly and compilers. It turns out writing web assembly is not so simply and apparently there is no malloc or GC. So this means manual memmory management :) going back to basic turing machine. When you compare this with adding a flag to your program to compile it to wasm, it feels like missing out on an ocean of interesting things. Hence this compiler tries to show a drop of this ocean.

  • Supports JIT compile and execution
  • Supports compiilation to multiple backends including LLVM, CraneliftIR and SingleShot
  • Supports emitting .wasmu (wasmer module serial format) which can be executes with wasmer-headless
  • Integrates with wasm-opt for optimizing emitted wasm code
  • Uses WASI ABIs for input and output
  • Performs STDOUT buffering
/r/Compilers Thread Link - github.com