bytecodealliance / bytecodealliance/wac

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

Open
#95 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
208
Forks
41
Avg merge
2d 7h
Merged PRs (30d)
3

Description

**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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.