Skip to content

Allow adapters to import multiple interfaces#398

Merged
pchickey merged 1 commit intobytecodealliance:mainfrom
alexcrichton:adapt-multiple-interfaces
Oct 26, 2022
Merged

Allow adapters to import multiple interfaces#398
pchickey merged 1 commit intobytecodealliance:mainfrom
alexcrichton:adapt-multiple-interfaces

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit lifts the restriction that an adapter module as part of wit-component can only import a single interface. That restriction was a temporary artifact of the initial implementation due to the fact that at the time there was no convenient way to communicate about multiple imported interfaces. With the ComponentInterfaces encoding of a "world" now, though, the wit-component CLI is updated to require that the incoming adapter module has a component-type* custom section describing the world that it's importing.

@alexcrichton alexcrichton requested a review from pchickey October 26, 2022 14:15
This commit lifts the restriction that an adapter module as part of
`wit-component` can only import a single interface. That restriction was
a temporary artifact of the initial implementation due to the fact that
at the time there was no convenient way to communicate about multiple
imported interfaces. With the `ComponentInterfaces` encoding of a
"world" now, though, the `wit-component` CLI is updated to require that
the incoming adapter module has a `component-type*` custom section
describing the world that it's importing.
@alexcrichton alexcrichton force-pushed the adapt-multiple-interfaces branch from acb54f3 to 6aa45ec Compare October 26, 2022 17:34
Copy link
Copy Markdown
Contributor

@pchickey pchickey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome!

@pchickey pchickey merged commit 9e19a7d into bytecodealliance:main Oct 26, 2022
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 this pull request may close these issues.

2 participants