I'm looking at the definition for top level document here:
https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#top-level-items
It is defined as:
wit-document ::= interface-item*
Which is a sequence of 0..N interface-item instances, defined as:
interface-item ::= 'interface' id strlit? '{' interface-items* '}'
Would this imply that a wit document can only consist of 0..N interfaces? This doesn't seem correct, as I can see examples here: https://github.com/WebAssembly/wasi-sockets/blob/main/common-types.wit where record, enum and type are top level elements.
Is this a typo? Should the definition instead be:
wit-document ::= interface-items*
That would allow for 0..N interface-item, which are defined as:
interface-items ::= resource-item
| variant-items
| record-item
| union-items
| flags-items
| enum-items
| type-item
| use-item
| func-item
I'm looking at the definition for top level document here:
https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#top-level-items
It is defined as:
Which is a sequence of 0..N
interface-iteminstances, defined as:Would this imply that a wit document can only consist of 0..N interfaces? This doesn't seem correct, as I can see examples here: https://github.com/WebAssembly/wasi-sockets/blob/main/common-types.wit where
record,enumandtypeare top level elements.Is this a typo? Should the definition instead be:
That would allow for 0..N
interface-item, which are defined as: