File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -343,9 +343,12 @@ Notes:
343
343
(which disallows core sorts other than ` core module ` ). When the optional
344
344
` externdesc ` immediate is present, validation requires it to be a supertype
345
345
of the inferred ` externdesc ` of the ` sortidx ` .
346
- * The ` name ` fields of ` externname ` must be unique among imports and exports,
347
- respectively. The ` URL ` fields of ` externname ` (that are present) must
348
- independently unique among imports and exports, respectively.
346
+ * The ` name ` fields of ` externname ` must be unique among all imports and exports
347
+ in the containing component definition, component type or instance type. (An
348
+ import and export cannot use the same ` name ` .)
349
+ * The ` id ` fields of ` externname ` (that are present) must independently be
350
+ unique among imports and exports, respectively. (An import and export * may*
351
+ have the same ` id ` .)
349
352
* URLs are compared for equality by plain byte identity.
350
353
351
354
## Name Section
Original file line number Diff line number Diff line change @@ -1348,9 +1348,13 @@ subdivision of external names allows component producers to represent a variety
1348
1348
of intentions for how a component is to be instantiated and executed so that a
1349
1349
variety of hosts can portably execute the component.
1350
1350
1351
- The ` name ` field of ` externname ` is required to be unique. Thus, a single
1352
- ` name ` has been used in the preceding definitions of ` with ` and ` alias ` to
1353
- uniquely identify imports and exports.
1351
+ The ` name ` field of ` externname ` is required to be unique between all the imports
1352
+ and exports of a component definition, component type or instance type. Thus, a
1353
+ single ` name ` can be used to unambiguously select any import or export. Based on
1354
+ this, ` with ` and ` alias ` can use a ` name ` (not ` externname ` ) to select an
1355
+ import or export. The uniqueness between imports and exports ensures that Wit
1356
+ and language bindings don't have to worry about separately namespacing imports
1357
+ and exports.
1354
1358
1355
1359
In guest source-code bindings, the ` name ` is meant to be translated to
1356
1360
source-language identifiers (applying case-conversion, as described
You can’t perform that action at this time.
0 commit comments