Skip to content

Add [implements=<I>]L plainname for multiple imports#613

Open
ricochet wants to merge 1 commit intomainfrom
implements
Open

Add [implements=<I>]L plainname for multiple imports#613
ricochet wants to merge 1 commit intomainfrom
implements

Conversation

@ricochet
Copy link
Contributor

@ricochet ricochet commented Feb 25, 2026

Add [implements=<I>]L plainname for multiple imports of the same interface

Extend the WIT extern-type grammar to allow use-path as a third case,
enabling import id: use-path and export id: use-path to create
plain-named imports/exports whose instance type matches a named interface.

This allows importing the same interface multiple times under different
plain names (e.g., import primary: store; import secondary: store;),
encoded using the [implements=<interfacename>]label annotation pattern.

Fixes #287

Add [implements=<I>]L plainname for multiple imports of the same interface

Extend the WIT `extern-type` grammar to allow `use-path` as a third case,
enabling `import id: use-path` and `export id: use-path` to create
plain-named imports/exports whose instance type matches a named interface.

This allows importing the same interface multiple times under different
plain names (e.g., `import primary: store; import secondary: store;`),
encoded using the `[implements=<interfacename>]label` annotation pattern.

Fixes #287
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.

Support multiple imports of the same interface with different names

1 participant