Commit Graph
6 Commits
Author SHA1 Message Date
Ben Polinsky b15211474d Add opt-in WebGL builds that do not use eval()/new Function()
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
2026-10-19 09:51:05 -04:00
Rich Geldreich 136ac0185c Update README.md 2026-02-19 18:14:24 -05:00
Rich Geldreich 7cb7d1560e Update README.md 2026-02-19 18:13:57 -05:00
Rich Geldreich df1677b716 Update README.md 2026-02-19 18:13:07 -05:00
Don McCurdy 70eda127a8 Clean up. 2019-05-15 09:47:00 -07:00
Don McCurdy 871ccb0cb7 Update readmes. 2019-05-15 09:45:25 -07:00