@@ -539,14 +539,24 @@ variety of source languages. As syntactic sugar, the text format of `functype`
539
539
additionally allows ` result ` to be absent, interpreting this as `(result
540
540
unit)`.
541
541
542
- The ` instance ` type constructor represents the result of instantiating a
543
- component and thus is the same as a ` component ` type minus the description
544
- of imports.
542
+ The ` instance ` type constructor describes a list of named, typed definitions
543
+ that can be imported or exported by a component. Informally, instance types
544
+ correspond to the usual concept of an "interface" and instance types thus serve
545
+ as static interface descriptions. In addition to the S-Expression text format
546
+ defined here, which is meant to go inside component definitions, interfaces can
547
+ also be defined as standalone, human-friendly text files in the [ ` wit ` ] ( WIT.md )
548
+ [ Interface Definition Language] .
545
549
546
550
The ` component ` type constructor is symmetric to the core ` module ` type
547
- constructor and is built from a sequence of "declarators" which are used to
548
- describe the imports and exports of the component. There are four kinds of
549
- declarators:
551
+ constructor and contains * two* lists of named definitions for the imports
552
+ and exports of a component, respectively. As suggested above, instance types
553
+ can show up in * both* the import and export types of a component type.
554
+
555
+ Both ` instance ` and ` component ` type constructors are built from a sequence of
556
+ "declarators", of which there are four kinds&mdash ; ` type ` , ` alias ` , ` import ` and
557
+ ` export ` &mdash ; where only ` component ` type constructors can contain ` import `
558
+ declarators. The meanings of these declarators is basically the same as the
559
+ core module declarators introduced above.
550
560
551
561
As with core modules, ` importdecl ` and ` exportdecl ` classify component ` import `
552
562
and ` export ` definitions, with ` importdecl ` allowing an identifier to be
@@ -1103,6 +1113,7 @@ and will be added over the coming months to complete the MVP proposal:
1103
1113
[ ABI ] : https://en.wikipedia.org/wiki/Application_binary_interface
1104
1114
[ Environment Variables ] : https://en.wikipedia.org/wiki/Environment_variable
1105
1115
[ Linear ] : https://en.wikipedia.org/wiki/Substructural_type_system#Linear_type_systems
1116
+ [ Interface Definition Language ] : https://en.wikipedia.org/wiki/Interface_description_language
1106
1117
1107
1118
[ module-linking ] : https://github.com/WebAssembly/module-linking/blob/main/design/proposals/module-linking/Explainer.md
1108
1119
[ interface-types ] : https://github.com/WebAssembly/interface-types/blob/main/proposals/interface-types/Explainer.md
0 commit comments