Skip to content

Commit 71a42a5

Browse files
fix(lang/rust): links
1 parent d54e43f commit 71a42a5

File tree

2 files changed

+7
-4
lines changed
  • component-model/src/language-support

2 files changed

+7
-4
lines changed

component-model/src/language-support/creating-runnable-components/rust.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
## Exporting the `wasi:cli/run` interface
44

5-
Any reactor (library-like) component can *also* export the [`run` interface]wasi-cli-iface-run] inside [WASI CLI][wasi-cli],
5+
Any reactor (library-like) component can *also* export the [`run` interface][wasi-cli-iface-run] inside [WASI CLI][wasi-cli],
66
and signal to ecosystem projects that it can be executed.
77

88
> [!WARNING]
99
> Reactor components can be reused, and while most platforms may *not* choose to reuse a component after `wasi:cli/run`
1010
> has been called, there is no guarantee that they will or will not.
1111
12+
[wasi-cli-iface-run]: https://github.com/WebAssembly/wasi-cli/tree/main/wit/run.wit
13+
[wasi-cli]: https://github.com/WebAssembly/wasi-cli
14+
1215
### 1. Create a new Rust library project
1316

1417
To build a simple component that exports `wasi:cli/run`, first create a new Rust project:

component-model/src/language-support/using-wit-resources/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Using WIT Resources (Rust)
22

3-
[Resources](../design/wit.md#resources) are handles to entities that live outside the component (i.e. in a host, or other component).
3+
[Resources](../../design/wit.md#resources) are handles to entities that live outside the component (i.e. in a host, or other component).
44

55
## An example stack-based Reverse Polish Notation (RPN) calculator
66

@@ -114,7 +114,7 @@ This completes the implementation of the calculator `engine` resource. Run `carg
114114

115115
To use the calculator engine in another component, that component must import the resource.
116116

117-
1. [Create a runnable component](../../creating-runnable-components/rust.md) as shown in previous sections.
117+
1. [Create a runnable component](../creating-runnable-components/rust.md) as shown in previous sections.
118118

119119
2. Add a `wit/component.wit` to your project, and write a WIT world that imports the RPN calculator types:
120120

@@ -158,7 +158,7 @@ To use the calculator engine in another component, that component must import th
158158

159159
Building the component as is creates a WebAssembly component with an *unsatisfied import* -- namely the `docs:rpn/types` import.
160160

161-
After building the component, it must be [composed with a `.wasm` component that implements the resource.](../composing-and-distributing/composing.md). After composition creates a component with no unsatisfied imports, the composed command component can be run with `wasmtime run`.
161+
After building the component, it must be [composed with a `.wasm` component that implements the resource.](../../composing-and-distributing/composing.md). After composition creates a component with no unsatisfied imports, the composed command component can be run with `wasmtime run`.
162162

163163
Alternatively, a host that can provide the `docs:rpn/types` import (and related resource) can also be used to run the component
164164
in it's "incomplete" state (as the host will "complete" the componnt by providing the expected import).

0 commit comments

Comments
 (0)