This is just an implementation of good old Conway's Game of Life in C++ for WebAssembly and nothing else.
- Install clang compiler, cmake and make to your system
- Install Emscripten framework to your system and make shure you have
emcmake
andem++
commands working - Change your directory to
yal/build
- Configure project with
emcmake cmake .. -DCMAKE_BUILD_TYPE=Release
- Build project with
make -j4
- After succesful build there will be files
yal.wasm
(contains WebAssembly application code),yal.js
(contains application runtime in JS) andyal.html
(contains end-user web page to interact with) inyal/build/bin
Unfortunately, protection from cross origin resource sharing (CORS) most likely will not allow you to run your the newely built
Web Assembly application locally by just opening yal.html
file in web browser.
Therefore, you will need to install any http web server (for example Apache) on your system. For example, after installing Apache in Fedora,
you need to copy the files from the yal/build/bin
directory to /var/www/html
and start the web server with the systemctl start httpd
command.
Than navigate to http://localhost/yal.html
and enjoy tha game.
Check your OS distribution manuals to learn more.
Also you can just host this application on any web server you may whant to - it is fully client-side, no special support from server is required.
(c) 2023 - Mikhail A. Motylenok
This is free software, made just for fun.