With the default DYNAMIC_EXECUTION=1, embind generates its invokers at
runtime with new Function(). A Content-Security-Policy without
'unsafe-eval' blocks this, so the transcoder and encoder fail to start
with an EvalError.
Add two CMake options to webgl/transcoder and webgl/encoder:
- NO_DYNAMIC_EXECUTION (default OFF) adds -s DYNAMIC_EXECUTION=0.
- EMBIND_AOT (default ON, only used with NO_DYNAMIC_EXECUTION) adds
-s EMBIND_AOT=1. This generates the invokers at build time, so
embind calls stay as fast as with the default build.
The default build does not change. The .wasm output is byte-identical
in all configurations; only the JS glue changes.
Fixes#464