Add WASM build target for Web version of glslang
This adds build rules to support generating a WASM binary to be used on the web. The API exposed to web applications is definated in the new glslang.js.cpp file.
This commit is contained in:
parent
3cea2e5882
commit
c96e42dca8
4 changed files with 336 additions and 0 deletions
14
HOWTO-build-wasm.md
Normal file
14
HOWTO-build-wasm.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Build as usual (see `README.md`), but:
|
||||
* Need `emsdk` in your *PATH*
|
||||
+ Instructions located
|
||||
[here](https://emscripten.org/docs/getting_started/downloads.html#sdk-download-and-install)
|
||||
* Do not checkout SPIRV-Tools into External/
|
||||
+ Does not work correctly with emscripten out of the box and we don't want
|
||||
it in the build anyway.
|
||||
+ *TBD* Add flag to disable SPIRV-Tool inclusion even if directory is
|
||||
present.
|
||||
* Wrap call to `cmake` using `emconfigure`:
|
||||
+ e.g. `emconfigure cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_GLSLANG_WEB=ON
|
||||
-DENABLE_HLSL=OFF -DCMAKE_INSTALL_PREFIX="$(pwd)/install" ..`
|
||||
+ To get a 'true' size, make sure to use `brotli` to compress the .js and .wasm files
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue