Skip to content

Commit a1bda3f

Browse files
fix(lang/rust): fill in wkg config
Co-authored-by: Kate Goldenring <[email protected]>
1 parent db72d8d commit a1bda3f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

component-model/src/tutorial.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,14 @@ Since the calculator world imports the `add` interface, the command component ne
137137
To do this, we can [`wkg`][wkg] from [`wasm-pkg-tools`][wasm-pkg-tools]. We must first configure wkg to find the `docs:adder` repository:
138138

139139
```toml
140-
# TODO required wkg config
140+
# $XDG_CONFIG_HOME/wasm-pkg/config.toml
141+
default_registry = "ghcr.io"
142+
143+
[namespace_registries]
144+
# Tell wkg that packages with the `wasi` namespace are in an OCI registry under ghcr.io/webassembly
145+
wasi = { registry = "wasi", metadata = { preferredProtocol = "oci", "oci" = {registry = "ghcr.io", namespacePrefix = "webassembly/" } } }
146+
# Tell wkg that the component-book WITs can be found at ghcr.io/bytecodealliance/docs
147+
docs = { registry = "docs", metadata = { preferredProtocol = "oci", "oci" = {registry = "ghcr.io", namespacePrefix = "bytecodealliance/" } } }
141148
```
142149

143150
> [!NOTE]

0 commit comments

Comments
 (0)