diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-06-30 09:46:36 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-03 15:31:04 -0700 |
commit | 2c44a12bc755e4b59619a18027ab5b1a0752e0f1 (patch) | |
tree | e28255f759aa47035e36474cde8bc2748384bcb1 /emlink.py | |
parent | 1d043dddf1d99cffde43bf7005175c55771d73e8 (diff) |
docs
Diffstat (limited to 'emlink.py')
-rw-r--r-- | emlink.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -15,8 +15,13 @@ Limitations: * Modules cannot be minified (but can be minified after linking) * We duplicate code in some cases, like overlapping names in different modules, and function aliases - * We do not handle sharing of global constants across modules, only code (you can make a function to - access a constant, if you need that) + * We only share code between modules, not global variables. Global variables should be declared + in the module that uses them, other modules can reach them through function calls. For example, + a static class function implemented in one module can be called from another, and it can provide + access to static variables on that class. (Note that implementing the static class function in a + header will not work, then the code will be duplicated in each module, with only one of them + able to correctly access the variable - the one in the same module as where the variable is + declared.) * We do not link in compiled libraries (libc, libc++, etc.) in side modules. If the main module does not automatically link in the ones that side modules will need, you should compile the main module with |