A few of us on the core emscripten team have been tossing around ideas
about how to improve/modernize the modularization of emscripten-generated
code.

I've created a google doc
<https://docs.google.com/document/d/1ccH3NsRQgEc1HXWI_IFAnMbTM0Vn1lP_EhJmdLRzYvs>
with
comments open to anyone.  Please feel free to comment on this document and
raise any concerns you have either there or here on this thread.

The first step along the way is to improve encapsulation by bringing back
the old `-sMODULARIZE_INSTACE` settings (perhaps with a better name).   All
this setting really does is wrap the emscripten-generated code in a private
function context.   I'm hoping we can do this without affecting code size
in any significant way.

Ideally we would make this new mode the default, or even the only mode.
However there will likely be some users who are currently depending on the
emscripten internally being available in the global scope.   So at least
initially this will be optional, and perhaps enabled in `-sSTRICT` mode.

It would be very useful to know how many folks currently depend on the
internals of the generated code being available in the global scope?   Do
you use emscripten-generated functions or globals without accessing them
via the `Module` object?   (Note that if you use --closure=1 you already
cannot access these internals due to minification, so you won't be
affected by this change).

cheers,
sam

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/emscripten-discuss/CAL_va2_FWhBnRgKi_33Fw4nkhqFjV_uJKU4gGdSoBZjKf%3DOTwQ%40mail.gmail.com.

Reply via email to