1. Make two mode:
- LinkageType::Dynamic - emit modules as shared-libraries, keeping space for entrypoints (partially done, except indirect function position)
- LinkageType::Static - emit modules that will fill "segments" of data, so the layout is preserved.
Modules Entrypoints are added at end of indirect_function_table
2. Data segments improvements:
- process "Unnamed" data symbols.
- process "passive" data segments.
- create dep link for symbols with negative offset, also make sure offset is not out of bound for symbol. (BoundToPrevious symbols)
3. Custom sections:
- provides - simple section that can be copied, and added info about wamex.
- linking/debug/relocation sections.
4. Optimisation:
- ignore instruction processing during fn modify entry processing.(aka streaming code processing)
5. runtime code reduction for wasm-link crate (can be reimplemented on js, or inlined). twiggy can help
6. Fix storage variables- instead of global vars, emit local.
7. Document:
- constant extraction
- extended-const feature needs in segment allocation
- start fn generator (aka dyn relocation)
- export wasm-bindgen imported fns (externref shrims stubs)
8. Experimental:
- Box::pin(load_inner) can reduce size of extracted modules (the dep will be fully emited inside main module)
1. Cleanup tests (recreate test-data with rebuild.sh, mb without lazy-router)
2. Remove wamex_import fn from modules, since they only can be called by indirect calls. (check if it is possible and inline)