Add implements clause support to wac#200
Draft
ricochet wants to merge 1 commit intobytecodealliance:mainfrom
Draft
Add implements clause support to wac#200ricochet wants to merge 1 commit intobytecodealliance:mainfrom
ricochet wants to merge 1 commit intobytecodealliance:mainfrom
Conversation
Support the component model's [implements=<I>]L name form, which allows importing/exporting the same interface multiple times under different plain-name labels (e.g., primary/backup stores). - Extract the interface name from implements names in Package::from_bytes so Interface.id is set correctly (e.g., "wasi:keyvalue/store" instead of the raw "[implements=<wasi:keyvalue/store>]primary") - Skip instance deduplication for implements imports during graph encoding so both imports are preserved - Use entry().or_insert() for the instances map in both TypeEncoder and CompositionGraphEncoder to prevent a second implements import from overwriting the first's alias index
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
DO NOT MERGE until we can pin to a release of wasm-tools with implements.
Follow that work at: bytecodealliance/wasm-tools#2453
Support the component model's
[implements=<I>]Lname form, which allowsimporting/exporting the same interface multiple times under different
plain-name labels (e.g., primary/backup stores).
See the spec change here:
WebAssembly/component-model#613
so Interface.id is set correctly (e.g., "wasi:keyvalue/store" instead
of the raw "[implements=wasi:keyvalue/store]primary")
encoding so both imports are preserved
CompositionGraphEncoder to prevent a second implements import from
overwriting the first's alias index