I’m starting to build a frontend for a website that will use FMOD for audio.
For security purposes (and it looks like it is widely considered as a security best practice), I have turned off ‘unsafe-eval’ for all browser scripts.
But now the browser throws an error when calling
FMODModule due to a function in fmod_reduced.js called
createNamedFunction that is running some dynamic JS. (I’m currently using the wasm version)
After looking around for answers I found that you can turn off the generation of unsafe-eval-related JS in emcc by passing
-s NO_DYNAMIC_EXECUTION=1, but according to this issue, it looks like later versions of Emscripten actually have removed use of eval.
Would it be a possibility to make this change in your HTML5 distribution?
In the meantime, I’m going to see if linking the static library with that flag could work.