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

Implement a simple composition flow a la wasm-tools compose -d #80

Closed
rylev opened this issue Apr 12, 2024 · 0 comments · Fixed by #93
Closed

Implement a simple composition flow a la wasm-tools compose -d #80

rylev opened this issue Apr 12, 2024 · 0 comments · Fixed by #93

Comments

@rylev
Copy link
Collaborator

rylev commented Apr 12, 2024

Note: This issue is related to #53 which is a more general issue for implementing many common composition scenarios.

The most simple composition scenario is to "plug" the exports of one composition into the imports of another.

There's many different developer experiences for how this could work. The wasm-tools compose -d approach is to treat the component with imports as the "main" component while the component with the exports is the "dependency". This certainly is one way to think about such a composition, but I believe there's a more intuitive way: to treat both components as inputs into a "plug" operation that explicitly labels what type of connector type the component is (in a similar fashion to male/female connector types in electrical or networking contexts).

I'd therefore propose the following wac plug subcomand:

wac plug --plug $COMPONENT_WITH_EXPORTS --into $COMPONENT_WITH_IMPORTS

We'd likely want to support the following features:

  • The ability to specify multiple plugs
  • The ability to select only certain exports from a plug (e.g., --plug my_component.wasm[example:example/my-interface])
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

Successfully merging a pull request may close this issue.

1 participant