Skip to content

Commit 02779f4

Browse files
authored
Update readme with plug subcommand (#108)
* updated README with plug command
1 parent f5dcba1 commit 02779f4

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,26 @@ cargo install wac-cli
8888

8989
The `wac` CLI tool has three commands:
9090

91+
* `wac plug` - Plugs the imports of a component with one or more other components.
9192
* `wac parse` - Parses a composition into a JSON representation of the AST.
9293
* `wac resolve` - Resolves a composition into a JSON representation.
9394
* `wac encode` - Encodes a WAC source file as a WebAssembly component.
9495

96+
### Quick & Easy Compositions
97+
98+
To do simple compositions, use the `wac plug` command:
99+
100+
```
101+
wac plug my-socket.wasm --plug my-plug.wasm -o plugged.wasm
102+
```
103+
104+
Or mixing in packages published to a Warg registry:
105+
106+
```
107+
wac plug my-namespace:package-name --plug some-namespace:other-package-name -o plugged.wasm
108+
```
109+
110+
95111
### Encoding Compositions
96112

97113
To encode a composition, use the `wac encode` command:
@@ -150,6 +166,6 @@ wac encode --dep foo:bar=./baz.wasm -o output.wasm input.wac
150166
By default, dependencies must be binary-encoded WebAssembly components; to
151167
enable support for WAT files, use the `wat` build-time feature.
152168
153-
If the `registry` build-time feature is enabled, then dependencies may be
169+
If built with default features, then dependencies may be
154170
automatically resolved from a Warg registry and do not need to exist in the
155171
`deps` subdirectory or specified via the `--dep` CLI option.

0 commit comments

Comments
 (0)