GitHub - verdie-g/brainfuck2wasm: A brainfuck-to-WebAssembly compiler

1 min read Original article ↗

Skip to content

Navigation Menu

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

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

Topics

Resources

Readme

License

MIT license

Activity

Stars

47 stars

Watchers

5 watching

Forks

6 forks