Closed
Description
@kripken , one of the reasons why the number of exported functions is large for a main module is because we cannot differentiate between a system module and a user-implemented module. Thus, we end up exporting everything.
Would it make sense to introduce a MAIN_MODULE=3 whereby all functions are hidden by default and only those that are exported explicitly will be exposed? We can always get the list of C++ std functions by building a dummy main module with MAIN_MODULE=1 and add that list to the whitelist. This would be similar to DISABLE_EXCEPTION_CATCHING where we have a mode 2 to specify functions that should have exceptions enabled.
Can you let me have your thoughts on this proposal? Thanks.