-
Notifications
You must be signed in to change notification settings - Fork 1
Building Games for WebAssembly
Matthew LaRocca edited this page Jun 23, 2026
·
2 revisions
The easiest way to configure the project to be built for WebAssembly is to use the official emsdk Docker Container. Otherwise you will need to install and configure Emscripten. The commands in the examples below will utilize docker, however, if you install the SDK locally the steps are largely the same, except you would not invoke docker and instead run the commands in your terminal directory.
This instructions assume that your current working directory is at the project root.
docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emcmake cmake -DFW64_PLATFORM_WEB:STRING=ON -B /src/build_webBuild the assets for one of the targets:
npm run prepare_example_assets shading_modes web docker run --rm -v $(pwd):/src -u $(id -u):$(id -g) emscripten/emsdk emmake cmake --build build_web --target shading_modes