verdie-g / brainfuck2wasm

A brainfuck-to-WebAssembly compiler

Home Page:https://verdie-g.github.io/brainfuck2wasm/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

brainfuck2wasm

Compile brainfuck to webassembly.

function bfToWasm(bfStr: string, optimize: boolean): Uint8Array

Two pages of the linear memory are used. Each page is 64 KiB. The first one is for the output and the second one is for the brainfuck's array which is an array of 16384 4 byte wide cells.

Brainfuck's result is output in two format : string and array of int32.

TODO

  • Optimize brainfuck
  • Input instruction
  • Grow brainfuck's memory dynamically
  • Error handling

About

A brainfuck-to-WebAssembly compiler

https://verdie-g.github.io/brainfuck2wasm/

License:MIT License


Languages

Language:JavaScript 54.2%Language:HTML 45.8%