Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions design/mvp/Binary.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,12 @@ Notes:
(which disallows core sorts other than `core module`). When the optional
`externdesc` immediate is present, validation requires it to be a supertype
of the inferred `externdesc` of the `sortidx`.
* The `name` fields of `externname` must be unique among imports and exports,
respectively. The `URL` fields of `externname` (that are present) must
independently unique among imports and exports, respectively.
* The `name` fields of `externname` must be unique among all imports and exports
in the containing component definition, component type or instance type. (An
import and export cannot use the same `name`.)
* The `id` fields of `externname` (that are present) must independently be
unique among imports and exports, respectively. (An import and export *may*
have the same `id`.)
* URLs are compared for equality by plain byte identity.

## Name Section
Expand Down
10 changes: 7 additions & 3 deletions design/mvp/Explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -1348,9 +1348,13 @@ subdivision of external names allows component producers to represent a variety
of intentions for how a component is to be instantiated and executed so that a
variety of hosts can portably execute the component.

The `name` field of `externname` is required to be unique. Thus, a single
`name` has been used in the preceding definitions of `with` and `alias` to
uniquely identify imports and exports.
The `name` field of `externname` is required to be unique between all the imports
and exports of a component definition, component type or instance type. Thus, a
single `name` can be used to unambiguously select any import or export. Based on
this, `with` and `alias` can use a `name` (not `externname`) to select an
import or export. The uniqueness between imports and exports ensures that Wit
and language bindings don't have to worry about separately namespacing imports
and exports.

In guest source-code bindings, the `name` is meant to be translated to
source-language identifiers (applying case-conversion, as described
Expand Down