Skip to content

Commit

Permalink
Update world syntax:
Browse files Browse the repository at this point in the history
* Allow preceding `default` keyword
* Remove `export foo: u32`
* Specify more support in `interface-type` to include all the `use-from`
  possibilities such as `id`, `strlit`, and `id 'in' strlit`
  • Loading branch information
alexcrichton committed Dec 7, 2022
1 parent e425309 commit 6b2b01c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions design/mvp/WIT.md
Original file line number Diff line number Diff line change
Expand Up @@ -627,16 +627,17 @@ Worlds define a [componenttype](https://github.com/WebAssembly/component-model/b
Concretely, the structure of a world is:

```wit
world-item ::= 'world' id '{' world-items* '}'
world-item ::= 'default'? 'world' id '{' world-items* '}'
world-items ::= export-item | import-item
export-item ::= 'export' id ':' extern-type
import-item ::= 'import' id ':' extern-type
extern-type ::= ty | func-type | interface-type
extern-type ::= func-type | interface-type
interface-type ::= 'interface' '{' interface-items* '}'
| use-from
```

## Item: `interface`
Expand Down

0 comments on commit 6b2b01c

Please sign in to comment.