Skip to content

Commit 5a11e36

Browse files
authored
Relax the uniqueness requirements on kebab-names (#259)
Resolves #252
1 parent d6ba326 commit 5a11e36

File tree

2 files changed

+3
-12
lines changed

2 files changed

+3
-12
lines changed

design/mvp/Binary.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -352,12 +352,8 @@ Notes:
352352
(which disallows core sorts other than `core module`). When the optional
353353
`externdesc` immediate is present, validation requires it to be a supertype
354354
of the inferred `externdesc` of the `sortidx`.
355-
* The `name` fields of `exportname` and `importname` must be unique among all
356-
imports and exports in the containing component definition, component type or
357-
instance type. (An import and export cannot use the same `name`.)
358-
* The `iid`, `pkgid` and `pkgidset` of `importname` and `exportname` must be
359-
unique only among imports or exports. That is, two imports may *not*
360-
have the same id, but an import and export *may* have the same id.
355+
* The `<name>`, `<iid>`, `<pkgid>` and `<pkgidset>` of imports must be relatively unique.
356+
* The `<name>` and `<iid>` of exports must be relatively unique.
361357
* `<iid>`, `<pkgid>` and `<pkgidset>` refer to the grammatical productions defined in
362358
the [text format](#import-and-export-definitions).
363359
* `<valid semver>` is as defined by [https://semver.org](https://semver.org/)

design/mvp/Explainer.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,12 +1443,7 @@ options for naming imports:
14431443
when the given exported definition.
14441444

14451445
Export names include the same uniqueness requirements between exports as described
1446-
above for import names and *additionally* require kebab-`name`s to be unique
1447-
between imports and exports. This allows a single kebab name to uniquely select
1448-
an import *or* export without an "import" or "export" prefix. (The same
1449-
interface id can however be present as both an import and export, as is
1450-
necessary for basic [virtualization](examples/LinkTimeVirtualization.md) use
1451-
cases.)
1446+
above for import names.
14521447

14531448
As an example, the following component uses all 9 cases of imports and exports:
14541449
```wasm

0 commit comments

Comments
 (0)