Skip to content

Commit 111c83b

Browse files
fix(lang/rust): add some rationale for executable libraries
1 parent dac7f3b commit 111c83b

File tree

1 file changed

+3
-0
lines changed
  • component-model/src/language-support/creating-runnable-components

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ wasmtime run ./target/wasm32-wasip2/debug/runnable-example.wasm
5959

6060
## Enabling a library component to be run via the `wasi:cli/run` interface
6161

62+
Sometimes, it is useful to create a component that can *both* be used as a library (via
63+
exported interface) and executed standalone like a command component.
64+
6265
While reactor (library-like) components export interfaces that are meant to be used directly,
6366
they can *also* export the [`wasi:cli/run` interface][wasi-cli-iface-run] from [WASI CLI][wasi-cli],
6467
and signal to consumers that the library can also be run similarly to a binary that would run via a

0 commit comments

Comments
 (0)