Skip to content

Commit acee342

Browse files
authored
Update wit-component README (#1302)
Various bits of syntax needed updating. Closes #1300
1 parent f8716d4 commit acee342

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

crates/wit-component/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,14 @@ First `wit-component` supports the wasm-based encoding of a WIT package:
4848

4949
```sh
5050
$ cat demo.wit
51+
package my:demo;
52+
5153
interface host {
52-
hello: func()
54+
hello: func();
5355
}
54-
default world demo {
55-
import host: self.host
56+
57+
world demo {
58+
import host;
5659
}
5760

5861
$ wasm-tools component wit demo.wit -o demo.wasm --wasm
@@ -72,7 +75,7 @@ be used where the `demo.wit` argument is specified manually, however.
7275
```sh
7376
$ cat demo.core.wat
7477
(module
75-
(import "host" "hello" (func))
78+
(import "my:demo/host" "hello" (func))
7679
)
7780

7881
$ wasm-tools component embed demo.wit --world demo demo.core.wat -o demo.wasm

0 commit comments

Comments
 (0)