Shaderc as a JS library

Hey all,

Yesterday I compiled shaderc into a JS library with the minimal entry
points needed to compile GLSL to SPIRV inside a web application.

[image: Screenshot from 2017-10-24 17-17-52.png]

Source (But don't try to build this yet, it won't work - needs manual
intervention during build).
https://github.com/kainino0x/shaderc/commit/1035e488ac3dcf759d6017328abf20d1d39b672f

kainino@kainino> du -b shaderc.*
176816  shaderc.js
45094   shaderc.js.gz
2007815 shaderc.wasm
589023  shaderc.wasm.gz
So a total of 634,117 bytes between shaderc.js.gz and shaderc.wasm.gz.

(built with emcc -Oz
<https://kripken.github.io/emscripten-site/docs/tools_reference/emcc.html#emcc-oz>;
js files are the wasm wrappers, not asm.js)

-Kai

Received on Thursday, 26 October 2017 00:27:21 UTC