Skip to content

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

Open
@rylev

Description

@rylev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions