Refactor module loading API using Config-based entrypoint#30
Conversation
6313723 to
003c710
Compare
003c710 to
3f25c04
Compare
|
Thanks for the clean refactor, @jtakakura! Merged into Before merging I ran the full Commit Gate on both platforms plus a downstream regression check, since this PR touches the loading surface that several of our embedders depend on. Sharing the details for transparency: Mac (arm64)
Ubuntu x86_64 (all items above, same commands) — all green Downstream regression check — ClojureWasm pinned locally to this branch:
A few behavioral changes worth noting for the release notes at tag time:
Also nice incidental fixes I noticed: Thanks again — this makes the path for future Config additions (cancellation, allocator hooks, etc.) much cleaner. |
|
@chaploud Thanks for the deep-dive testing and the regression checks! It’s great to see the incidental fixes and fuel persistence aligned with your expectations. Really glad this helps clear the path for the next features. Looking forward to it 👍 |
Summary
This PR refactors the WasmModule loading API to consolidate various loading parameters into a single Config structure, as proposed in #29. This change simplifies the API surface and ensures that all resource limits are applied consistently before module execution.
Major Changes
Rationale
The previous loading API was becoming complex as more configuration options were added. By moving parameters into a Config struct, we provide a cleaner interface for embedders and a more robust foundation for future features, such as execution cancellation.
This refactoring is a prerequisite for the cancellation mechanism currently in draft at #28.
Related Issue
Closes #29