@@ -22,24 +22,14 @@ Install [`wasmtime`](https://github.com/bytecodealliance/wasmtime#installation):
2222``` sh
2323curl https://wasmtime.dev/install.sh -sSf | bash
2424```
25- Clone the [ component-docs] ( https://github.com/bytecodealliance/component-docs ) repo:
26- ``` sh
27- git clone https://github.com/bytecodealliance/component-docs
28- ```
2925
3026## 2. Scaffolding a Component
3127
3228We will create a component in Rust that implements the ` add ` function exported
33- by the [ ` adder ` world] [ docs-adder ] world in the
34- ` docs:adder `
29+ by the [ ` adder ` world] [ docs-adder ] world in the ` docs:adder `
3530[ package] ( https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#package-names ) .
3631
37- First ` cd ` into the ` tutorial ` directory found in the repo we just cloned:
38- ``` sh
39- cd component-docs/component-model/examples/tutorial
40- ```
41-
42- Now create a new WebAssembly component package called ` add ` :
32+ First, we will create a new WebAssembly component package called ` add ` :
4333``` sh
4434cargo component new add --lib && cd add
4535```
@@ -183,7 +173,7 @@ Because the `docs:adder` package is in a different project, we must first tell `
183173
184174``` toml
185175[package .metadata .component .target .dependencies ]
186- "docs:adder" = { path = " ../wit/ adder" } # directory containing the WIT package
176+ "docs:adder" = { path = " ../adder/wit " } # directory containing the WIT package
187177```
188178
189179> [ !NOTE]
@@ -294,8 +284,8 @@ As mentioned above, `cargo component build` doesn't generate a WIT file for a co
294284
295285 ```toml
296286 [package.metadata.component.target.dependencies]
297- "docs:calculator" = { path = "../wit/ calculator" }
298- "docs:adder" = { path = "../wit/ adder" }
287+ "docs:calculator" = { path = "../calculator/wit " }
288+ "docs:adder" = { path = "../adder/wit " }
299289 ```
300290
301291 > If the external package refers to other packages, you need to provide the paths to them as well.
0 commit comments