A simple project using WASM using emscripten and JS bindings using embind.
It implements Conway's Game of Life that runs in the browser using C++ code compiled to WebAssembly.
You can see the app running on our GitHub Pages: https://sergeychernyshev.github.io/wasm-life/
Use make
to build the project. It will compile the C++ code to WebAssembly and generate JS bindings.
It will also build a CLI version of the app as well.
Open index.html
in your browser using a local web server to run the app. Just opening it using file://
protocol will not work because of CORS restrictions.
We also play GitTerra, a game that generates a map for our code.