-
-
Notifications
You must be signed in to change notification settings - Fork 351
Compile as Emscripten WebAssembly
Patricio Gonzalez Vivo edited this page Oct 10, 2021
·
1 revision
Install emscripten which already includes glfw:
git clone https://github.com/emscripten-core/emsdk.git
cd emsdk
git pull
./emsdk install latest
./emsdk activate latest
source ./emsdk_env.sh
cd ..
git clone https://github.com/patriciogonzalezvivo/glslViewer.git
cd glslViewer
git submodule init
git submodule update
mkdir build
cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$EMSDK/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake
make
- Serve the file either using node or python
python3 -m http.server
Then open http://localhost:8000