Skip to content

Link host-side interface with canonical names #14346

Description

@chenyan2002

When -W component-model-canonical-names feature is enabled, the guest side component encodes interface names with canonical names, while the host-side bindgen is still using the full version. This causes the linking to fail.

NameMap currently supports matching a:b/c@0.2.1 with its alternate key a:b/c@0.2. But if the component is importing a:b/c@0.2, we cannot match it back with a:b/c@0.2.1. We need to refactor NameMap/alternate_lookup_key to be able to handle both canonical version and full version during the transition period.

Another fix is to add an option in the host side wit-bindgen to emit canonical names. But when the component is importing a full version, NameMap needs to know how to match it with the canonical name.

Raised from #14344 (comment)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasm-proposal:component-modelIssues related to the WebAssembly Component Model proposal

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions