mirror of
https://github.com/lexmount/moli.git
synced 2026-10-02 16:00:44 +00:00
JSON/CSS compilation retained independent copies in the module map and the synthetic module record. Share immutable text with Arc<str> across fetched sources, the portable module tree, and synthetic evaluation records instead of copying String buffers during cloning and registration. Release the module-map source after successful JavaScript/JSON/CSS compilation. Make fetched-source retention an exhaustive ModuleKind policy, preserving Wasm and text-preload source semantics. Context lookups remain weak record references. Cover the actual module-tree compile path: the record keeps exactly one strong reference to the original text allocation after fetch temporaries are dropped, and destroys it when disposed. Verify record clones share the same source and Wasm entries retain their binary source. Validation: - cargo fmt --all - cargo clippy --workspace --all-targets --all-features -- -D warnings - cargo nextest run --no-fail-fast: 19,013 passed, 16 skipped