馃敡 build wasm with DYNAMIC_EXECUTION=0 - #92
Conversation
embind builds its argument-marshaling invokers by generating JavaScript source at runtime and compiling it with `new Function`. Two such sites survive into the published dist, so `loadSpz()` fails initialization under any Content-Security-Policy without 'unsafe-eval'. Setting DYNAMIC_EXECUTION=0 makes embind emit its closure-based invoker fallback instead: the same argument marshaling, destructor handling and return conversion, expressed as a closure that iterates the argument-type table at call time. Public API and behavior are unchanged. Refs drumath2237#91
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
@drumath2237 Let me know if you'd consider this change. Some benchmarks - first go. I rebuilt the stock and |
|
@ben-polinsky |
All good! Thanks for the check-in. |
embind builds its argument-marshaling invokers by generating JavaScript source at runtime and compiling it with
new Function. Two such sites survive into the published dist, soloadSpz()fails initialization under any Content-Security-Policy without 'unsafe-eval'.Setting DYNAMIC_EXECUTION=0 makes embind emit its closure-based invoker fallback instead: the same argument marshaling, destructor handling and return conversion, expressed as a closure that iterates the argument-type table at call time. Public API and behavior are unchanged.
See #91