You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following up on the mailing list thread: --wrap-in-func seems to be pretty close to what I need (thanks!), except for the fact that it doesn't export the function itself in the global namespace (so I guess it could be useful from eval, but not from e.g. importScripts in a web worker.
The idea of emscripten's modularize is that loading the script exports (in the node.js case) or adds to the global namespace (in the brwoser case) a single function, which when called returns an instance of the program. This is especially useful when the program has global state, since it gives you an easy way to reset it without reloading (and thus reparsing) the entire script.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi there,
Following up on the mailing list thread:
--wrap-in-func
seems to be pretty close to what I need (thanks!), except for the fact that it doesn't export the function itself in the global namespace (so I guess it could be useful fromeval
, but not from e.g.importScripts
in a web worker.The idea of emscripten's
modularize
is that loading the script exports (in the node.js case) or adds to the global namespace (in the brwoser case) a single function, which when called returns an instance of the program. This is especially useful when the program has global state, since it gives you an easy way to reset it without reloading (and thus reparsing) the entire script.Thanks!
The text was updated successfully, but these errors were encountered: