From 8beb4d3fb471cddaf02f91ba4023edf33dddde59 Mon Sep 17 00:00:00 2001 From: Liigo Zhuang Date: Wed, 11 Dec 2024 17:13:56 +0800 Subject: [PATCH] fix a few `wasi:cli` typos --- component-model/src/language-support/rust.md | 4 ++-- component-model/src/tutorial.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/component-model/src/language-support/rust.md b/component-model/src/language-support/rust.md index 057c5f2..be090c4 100644 --- a/component-model/src/language-support/rust.md +++ b/component-model/src/language-support/rust.md @@ -194,7 +194,7 @@ As the import is unfulfilled, the `calculator.wasm` component could not run by i ## Creating a command component with `cargo component` -A _command_ is a component with a specific export that allows it to be executed directly by `wasmtime` (or other `wasm:cli` hosts). In Rust terms, it's the equivalent of an application (`bin`) package with a `main` function, instead of a library crate (`lib`) package. +A _command_ is a component with a specific export that allows it to be executed directly by `wasmtime` (or other `wasi:cli` hosts). In Rust terms, it's the equivalent of an application (`bin`) package with a `main` function, instead of a library crate (`lib`) package. To create a command with cargo component, run: @@ -204,7 +204,7 @@ cargo component new Unlike library components, this does _not_ have the `--lib` flag. You will see that the created project is different too: -- It doesn't contain a `.wit` file. `cargo component build` will automatically export the `wasm:cli/run` interface for Rust `bin` packages, and hook it up to `main`. +- It doesn't contain a `.wit` file. `cargo component build` will automatically export the `wasi:cli/run` interface for Rust `bin` packages, and hook it up to `main`. - Because there's no `.wit` file, `Cargo.toml` doesn't contain a `package.metadata.component.target` section. - The Rust file is called `main.rs` instead of `lib.rs`, and contains a `main` function instead of an interface implementation. diff --git a/component-model/src/tutorial.md b/component-model/src/tutorial.md index edc669a..039b57d 100644 --- a/component-model/src/tutorial.md +++ b/component-model/src/tutorial.md @@ -88,7 +88,7 @@ documentation](creating-and-consuming/authoring.md) to create a component that i ## Create a `command` component A _command_ is a component with a specific export that allows it to be executed directly by -`wasmtime` (or other `wasm:cli` hosts). The host expects it to export the [`wasi:cli/run` +`wasmtime` (or other `wasi:cli` hosts). The host expects it to export the [`wasi:cli/run` interface](https://github.com/WebAssembly/wasi-cli/blob/main/wit/run.wit), which is the equivalent of the `main` function to WASI. `cargo-component` will automatically resolve a Rust `bin` package with a `main` function to a component with `wasi:cli/run` exported. Scaffold a new Wasm application