Skip to content

Commit 8e38718

Browse files
Merge pull request #163 from kate-goldenring/use-wac-plug
fix: use wac plug in tutorial and running guide
2 parents 94eb52f + e660f42 commit 8e38718

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

component-model/examples/tutorial/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ world app {
3838
}
3939
```
4040

41-
4241
To expand the exercise to add more components, add another operator world, expand the enum, and modify the `command` component to call it.
4342

4443
## Building and running the example

component-model/src/creating-and-consuming/running.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ If you're writing a library-style component - that is, one that exports a custom
2424

2525
4. Build your command component to a `.wasm` file. You will not be able to run this in `wasmtime` yet, as its imports are not yet satisfied.
2626

27-
5. Compose your command component with your library component by running `wasm-tools compose <path/to/command.wasm> -d <path/to/library.wasm> -o main.wasm`.
27+
5. Compose your command component with your library component by running `wac plug <path/to/command.wasm> --plug <path/to/library.wasm> -o main.wasm`.
2828

2929
6. Run the composed component using `wasmtime run main.wasm`
3030

component-model/src/tutorial.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,14 @@ For reference, see a completed [example](https://github.com/bytecodealliance/com
124124
## Composing the calculator
125125

126126
Now, we are ready to bring our components together into one runnable calculator component, using
127-
`wasm-tools`. We will first compose the calculator component with the add component to satisfy it's
127+
`wac`. We will first compose the calculator component with the add component to satisfy it's
128128
imports. We then compose that resolved calculator component with the command component to satisfy
129129
its `calculate` imports. The result is a command component that has all its imports satisfied and
130130
exports the `wasi:cli/run` function, which can be executed by `wasmtime`.
131131

132132
```sh
133-
wasm-tools compose calculator.wasm -d adder.wasm -o composed.wasm
134-
wasm-tools compose command.wasm -d composed.wasm -o final.wasm
133+
wac plug calculator.wasm --plug adder.wasm -o composed.wasm
134+
wac plug command.wasm --plug composed.wasm -o final.wasm
135135
```
136136

137137
> If you'd prefer to take a more visual approach to composing components, see the [documentation on composing components with wasmbuilder.app](creating-and-consuming/composing.md#composing-components-with-a-visual-interface).

0 commit comments

Comments
 (0)