Re: Shaderc as a JS library

> On Oct 25, 2017, at 5:26 PM, Kai Ninomiya <kainino@google.com> wrote:
> 
> 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.
> 
> <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 <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)

Other interesting performance questions:

- What's the runtime memory cost of loading or using these libraries?
- How long does it take to transpile a typical shader?

Received on Thursday, 26 October 2017 00:34:38 UTC