A skeleton Cmake
project to generate WASM
and JS
file and serving with HTML
. Ubuntu
WSL2
is used from Microsoft
Windows 10 - x64
machine for testing..
- Clone this repo.
- Install
Emscripten
by following steps on emscripten website - In CLion CMAKE setting add
CMAKE_TOOLCHAIN_FILE=path/to/emscripten/emscripten/version/cmake/Modules/Platform/Emscripten.cmake
- Build from
Clion
- It can be run following ways
- Run in
Emscripten
environment withemrun Public/index.htm
. OR - Open file
Public/index.htm
inClion
then click your faworite browser from upper right corner.
- Run in
- In developer tools console of browser you will see the result as
144
.
The repo is created from the following references.