Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider an additional command that mimics wasm-tools compose -d semantics more closely #95

Open
rylev opened this issue Apr 26, 2024 · 0 comments

Comments

@rylev
Copy link
Collaborator

rylev commented Apr 26, 2024

tl;dr wac plug differs in semantics from wasm-tools compose -d for simplicity sake. While a majority of users are likely to only need the simplified semantics of wac plug, there are certainly use cases where the more advanced semantics are desireable. We should consider if and how we would want to expose those semantics as a wac subcommand.

wac plug performs simple composition where exports of various "plug" components can be used to satisfy the imports of a single "socket" component. Any imports of the plug components are left as imports in the result composition. This differs from wasm-tools compose -d which instead declared "dependencies" and a "main" component where each dependencies exports could be used to satisfy other dependencies imports in addition to the "main" component.

In other words, wac plug's "plugs" only can satisfy the "socket" components imports while wasm-tools compose -d's "dependencies" can satisfy other dependencies' imports as well as the "main" component's imports.

wasm-tools compose -d's semantics are still useful in many situations, and we may wish to expose such semantics in a wac subcommand. However, it's not exactly clear how this should be done. A wac link subcommand has previously been suggested, but others brought up that such nomenclature might be confusing as "linking" is used in different contexts for different things.

For now: we've decided to sit and wait for user feedback on wac plug and the lack of a direct alternative for wasm-tools compose -d to see what the right next steps are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant