In this work is represented a Brainf*ck to WebAssembly compiler. To build a compiler we had to learn about WebAssembly binary and text format, JavaScript API and tried out already existing compilers for C/C++ and Rust programming languages and WebAssembly toolkits. Compiler was implemented in WebAssembly text format and with toolkit WABT compiled to WebAssembly binary format. JavaScript API, which loads WebAssembly module from server and communicates with it, and html page for web display are the other two components of compiler. Compiler was successfully implemented. It compiles Brainf*ck into executable programs without any issues.
|