From 242f5bed9deefeed0b296380a770340c93a6716a Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Wed, 9 Sep 2026 11:01:56 +0000 Subject: [PATCH 1/3] fix(docs): repair WASI Preview 2 links --- component-model/src/introduction.md | 2 +- .../src/language-support/building-a-simple-component/c.md | 2 +- component-model/src/reference/faq.md | 2 +- component-model/src/reference/useful-links.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/component-model/src/introduction.md b/component-model/src/introduction.md index 3e387bcd..59bd9909 100644 --- a/component-model/src/introduction.md +++ b/component-model/src/introduction.md @@ -82,7 +82,7 @@ A system or platform may expose some or all of the WASI APIs to components. The current stable release of WASI is [WASI 0.2.0](https://github.com/WebAssembly/WASI/pull/577), which was released on January 25, 2024. -WASI 0.2.0 is [a stable set of WIT definitions](https://github.com/WebAssembly/WASI/blob/main/docs/Preview2.md) +WASI 0.2.0 is [a stable set of WIT definitions](https://github.com/WebAssembly/WASI/blob/wasi-0.2/docs/Preview2.md) that components can target. WASI proposals will continue to evolve and new ones will be introduced; however, users of the component model can now pin to any stable release >= `v0.2.0`. diff --git a/component-model/src/language-support/building-a-simple-component/c.md b/component-model/src/language-support/building-a-simple-component/c.md index b508c898..c012cee5 100644 --- a/component-model/src/language-support/building-a-simple-component/c.md +++ b/component-model/src/language-support/building-a-simple-component/c.md @@ -97,7 +97,7 @@ that is, code which fulfills the definition of the interface function declared i "P1" refers to [WASI Preview 1](https://github.com/WebAssembly/WASI/tree/wasi-0.1), the initial version of the WASI APIs. -"P2" refers to [WASI Preview 2](https://github.com/WebAssembly/WASI/blob/main/docs/Preview2.md), +"P2" refers to [WASI Preview 2](https://github.com/WebAssembly/WASI/blob/wasi-0.2/docs/Preview2.md), which introduced the component model. While in the past building a P2 component required conversion from a P1 component, diff --git a/component-model/src/reference/faq.md b/component-model/src/reference/faq.md index 5812bd76..b3e2aa1f 100644 --- a/component-model/src/reference/faq.md +++ b/component-model/src/reference/faq.md @@ -81,7 +81,7 @@ expect to access—WASI enables building interfaces on top of a shared standard Preview 1 refers to [the first iteration of the Component Model](https://github.com/WebAssembly/WASI/tree/wasi-0.1) which was based on WITX and is now deprecated. -Preview 2 refers to [a newer iteration of the Component Model](https://github.com/WebAssembly/WASI/blob/main/docs/Preview2.md) +Preview 2 refers to [a newer iteration of the Component Model](https://github.com/WebAssembly/WASI/blob/wasi-0.2/docs/Preview2.md) which uses WebAssembly Interface Types (WIT). Preview 3 (WASI 0.3, released June 11, 2026) adds native async to the Component Model: `async func`, `stream`, and `future` are now Canonical ABI primitives, and the `wasi:io` package is removed. diff --git a/component-model/src/reference/useful-links.md b/component-model/src/reference/useful-links.md index 8cb2d6b2..62dbde5c 100644 --- a/component-model/src/reference/useful-links.md +++ b/component-model/src/reference/useful-links.md @@ -10,7 +10,7 @@ The following references are helpful in understanding the Component Model and re - [Canonical ABI][canonical-abi] [wasm-cm-repo]: https://github.com/WebAssembly/component-model -[wasi-p2]: https://github.com/WebAssembly/WASI/blob/main/docs/Preview2.md +[wasi-p2]: https://github.com/WebAssembly/WASI/blob/wasi-0.2/docs/Preview2.md [ast-explainer]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md [canonical-abi]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md [wac]: https://github.com/bytecodealliance/wac From 4fd7f325ac87ac0671faba7c0395fa19eaca9cda Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Wed, 9 Sep 2026 11:10:33 +0000 Subject: [PATCH 2/3] ci(docs): check external links on every build --- .github/actions/mdbook/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/mdbook/action.yml b/.github/actions/mdbook/action.yml index a85b0970..9fbd8f66 100644 --- a/.github/actions/mdbook/action.yml +++ b/.github/actions/mdbook/action.yml @@ -70,6 +70,7 @@ runs: id: book-build env: PUBLISH_DOMAIN: ${{ inputs.publish-domain }} + MDBOOK_OUTPUT__LINKCHECK2__FOLLOW_WEB_LINKS: 'true' run: | just build-book echo "output-path=$(just print-book-dir)" >> $GITHUB_OUTPUT From ac072a44cd98bc96dc6569bee9b2e48bd1e9ffef Mon Sep 17 00:00:00 2001 From: Victor Adossi Date: Wed, 9 Sep 2026 11:13:04 +0000 Subject: [PATCH 3/3] fix(docs): repair links found by external link checking --- .../src/design/component-model-concepts.md | 2 +- component-model/src/design/interfaces.md | 4 ++-- .../building-a-simple-component/go.md | 2 +- .../building-a-simple-component/rust.md | 14 +++++++------- .../creating-runnable-components/rust.md | 2 +- .../importing-and-reusing-components/javascript.md | 4 ++-- .../using-http-in-components/rust.md | 2 +- component-model/src/reference/faq.md | 2 +- component-model/src/running-components.md | 2 +- component-model/src/running-components/wasmtime.md | 4 ++-- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/component-model/src/design/component-model-concepts.md b/component-model/src/design/component-model-concepts.md index 59e21a27..34600562 100644 --- a/component-model/src/design/component-model-concepts.md +++ b/component-model/src/design/component-model-concepts.md @@ -61,7 +61,7 @@ must be invoked in an environment that implements those interfaces. A [_package_](./packages.md) is a set of WIT files containing a related set of interfaces and worlds. -For example, the [wasi-http](https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/proxy.wit) package includes +For example, the [wasi-http](https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/http/wit/proxy.wit) package includes an `imports` world encapsulating the interfaces that an HTTP proxy depends on, and a `proxy` world that depends on `imports`. diff --git a/component-model/src/design/interfaces.md b/component-model/src/design/interfaces.md index ff8ffdd1..f55f3ef8 100644 --- a/component-model/src/design/interfaces.md +++ b/component-model/src/design/interfaces.md @@ -52,7 +52,7 @@ and imports anything imported by the "wall clock" interface. Interfaces are defined using [the WIT language](./wit.md). [wp-contract]: https://en.wikipedia.org/wiki/Design_by_contract -[wasi-http-handler]: https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/handler.wit -[wasi-clocks-wall-clock]: https://github.com/WebAssembly/WASI/blob/main/proposals/clocks/wit/wall-clock.wit +[wasi-http-handler]: https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/http/wit/handler.wit +[wasi-clocks-wall-clock]: https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/clocks/wit/wall-clock.wit > For a more formal definition of an interface, take a look at the [WIT specification](https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md). diff --git a/component-model/src/language-support/building-a-simple-component/go.md b/component-model/src/language-support/building-a-simple-component/go.md index 86ebdfdb..3cd40d25 100644 --- a/component-model/src/language-support/building-a-simple-component/go.md +++ b/component-model/src/language-support/building-a-simple-component/go.md @@ -102,7 +102,7 @@ $ cargo run --release -- 1 2 ../../../go-adder/main.wasm With this, we have successfully built and run a basic WebAssembly component with Go 🎉 -[crates-wasmtime]: https://crates.io/crates/wasmtime +[crates-wasmtime]: https://docs.rs/wasmtime [repo-component-docs]: https://github.com/bytecodealliance/component-docs [docs-adder]: https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/tutorial/wit/adder/world.wit [componentize-go]: https://github.com/bytecodealliance/componentize-go diff --git a/component-model/src/language-support/building-a-simple-component/rust.md b/component-model/src/language-support/building-a-simple-component/rust.md index 8d59409b..c54dc704 100644 --- a/component-model/src/language-support/building-a-simple-component/rust.md +++ b/component-model/src/language-support/building-a-simple-component/rust.md @@ -8,8 +8,8 @@ available targets in the toolchain: - `wasm32-wasip2` ([WASI P2][wasip2]) [wasm-core]: https://webassembly.github.io/spec/core/ -[wasip1]: https://github.com/WebAssembly/WASI/tree/main/legacy -[wasip2]: https://github.com/WebAssembly/WASI/tree/main/wasip2 +[wasip1]: https://github.com/WebAssembly/WASI/tree/wasi-0.1 +[wasip2]: https://github.com/WebAssembly/WASI/tree/wasi-0.2 > [!NOTE] > To use the targets above, ensure that they are enabled via the Rust toolchain (e.g. `rustup`). @@ -31,7 +31,7 @@ cargo build --target wasm32-wasip2 > the project is in the process of being deprecated as native tooling can be used directly. [rust]: https://rust-lang.org -[cargo-component]: https://crates.io/crates/cargo-component +[cargo-component]: https://github.com/bytecodealliance/cargo-component ## 1. Setup @@ -138,8 +138,8 @@ types to a module that can be referred to later. At present, the code won't *do* much, but that's because we haven't added our implementation yet. -[crates-wit-bindgen]: https://crates.io/crates/wit-bindgen -[crates-wit-bindgen-cli]: https://crates.io/crates/wit-bindgen-cli +[crates-wit-bindgen]: https://docs.rs/wit-bindgen +[crates-wit-bindgen-cli]: https://github.com/bytecodealliance/wit-bindgen#cli-installation [rustdoc-wit-bindgen-generate]: https://docs.rs/wit-bindgen/latest/wit_bindgen/macro.generate.html ## 5. Implementing the `adder` world via the generated `Guest` Trait @@ -163,7 +163,7 @@ There are a few points of note in the code listing above: > To dive into the code generated by the `wit_bindgen::generate!` macro, you can use the [`cargo-expand` crate][crates-cargo-expand] [export-macro]: https://docs.rs/wit-bindgen/latest/wit_bindgen/macro.generate.html#exports-the-export-macro -[crates-cargo-expand]: https://crates.io/crates/cargo-expand +[crates-cargo-expand]: https://github.com/dtolnay/cargo-expand ## 6. Building a Component @@ -248,6 +248,6 @@ $ cargo run --release -- 1 2 ../add/target/wasm32-wasip2/release/adder.wasm With this, we have successfully built and run a basic WebAssembly component with Rust 🎉 -[crates-wasmtime]: https://crates.io/crates/wasmtime +[crates-wasmtime]: https://docs.rs/wasmtime [repo-component-docs]: https://github.com/bytecodealliance/component-docs [docs-adder]: https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/tutorial/wit/adder/world.wit diff --git a/component-model/src/language-support/creating-runnable-components/rust.md b/component-model/src/language-support/creating-runnable-components/rust.md index e4dceebc..88cbaeb0 100644 --- a/component-model/src/language-support/creating-runnable-components/rust.md +++ b/component-model/src/language-support/creating-runnable-components/rust.md @@ -4,7 +4,7 @@ This page has content for both **WASI 0.2** and **WASI 0.3**. Use the tabs below to switch between versions where they differ. -> **WASI 0.3 toolchain note.** Rust's [`wasm32-wasip3` target](https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip3.html) is currently Tier 3 with no prebuilt artifacts; building for it requires constructing the standard library from source. The 0.3 example on this page therefore uses the library/reactor pattern targeting `wasm32-wasip2`, where [`wit-bindgen`](https://crates.io/crates/wit-bindgen)'s `async` feature handles the 0.3 binding generation. There is no Rust-idiomatic 0.3 path for the `fn main()` command-component pattern yet. +> **WASI 0.3 toolchain note.** Rust's [`wasm32-wasip3` target](https://doc.rust-lang.org/nightly/rustc/platform-support/wasm32-wasip3.html) is currently Tier 3 with no prebuilt artifacts; building for it requires constructing the standard library from source. The 0.3 example on this page therefore uses the library/reactor pattern targeting `wasm32-wasip2`, where [`wit-bindgen`](https://docs.rs/wit-bindgen)'s `async` feature handles the 0.3 binding generation. There is no Rust-idiomatic 0.3 path for the `fn main()` command-component pattern yet. diff --git a/component-model/src/language-support/importing-and-reusing-components/javascript.md b/component-model/src/language-support/importing-and-reusing-components/javascript.md index ae412980..13e064d9 100644 --- a/component-model/src/language-support/importing-and-reusing-components/javascript.md +++ b/component-model/src/language-support/importing-and-reusing-components/javascript.md @@ -35,7 +35,7 @@ which contains the `reverse-and-uppercase` function (in JavaScript, `reverseAndU > Functionality is imported via the `interface`, *not* the `world`. > `world`s can be included/used, but the syntax is slightly different for that. -The JavaScript to make this work ([`string-reverse-upper.mjs` in `jco/examples`][string-reverse-upper-mjs]) +The JavaScript to make this work ([`string-reverse-upper.js` in `jco/examples`][string-reverse-upper-js]) looks like this: ```js @@ -165,7 +165,7 @@ reverseAndUppercase('!dlroW olleH') = HELLO WORLD! [wac]: https://github.com/bytecodealliance/wac [jco-examples-string-reverse-upper]: https://github.com/bytecodealliance/jco/tree/main/examples/components/string-reverse-upper -[string-reverse-upper-mjs]: https://github.com/bytecodealliance/jco/blob/main/examples/components/string-reverse-upper/string-reverse-upper.mjs +[string-reverse-upper-js]: https://github.com/bytecodealliance/jco/blob/main/examples/components/string-reverse-upper/string-reverse-upper.js ## Using `jco transpile` to run components from Javsacript diff --git a/component-model/src/language-support/using-http-in-components/rust.md b/component-model/src/language-support/using-http-in-components/rust.md index 533b469c..c495923c 100644 --- a/component-model/src/language-support/using-http-in-components/rust.md +++ b/component-model/src/language-support/using-http-in-components/rust.md @@ -32,7 +32,7 @@ Add [`wstd`][wstd], a Rust async standard library for Wasm components as a depen ```console cargo add wstd ``` -`wstd` provides idiomatic Rust bindings for WASI standard interfaces [(`wasi:http`)](https://github.com/WebAssembly/WASI/tree/main/proposals/http) to increase ease-of-use for Rust WebAssembly components. Since we are using `wstd`, we will not need to add WIT files or depend on [`wit-bindgen`](https://crates.io/crates/wit-bindgen) directly. +`wstd` provides idiomatic Rust bindings for WASI standard interfaces [(`wasi:http`)](https://github.com/WebAssembly/WASI/tree/main/proposals/http) to increase ease-of-use for Rust WebAssembly components. Since we are using `wstd`, we will not need to add WIT files or depend on [`wit-bindgen`](https://docs.rs/wit-bindgen) directly. > [!NOTE] diff --git a/component-model/src/reference/faq.md b/component-model/src/reference/faq.md index b3e2aa1f..3729b4dc 100644 --- a/component-model/src/reference/faq.md +++ b/component-model/src/reference/faq.md @@ -24,7 +24,7 @@ WebAssembly components can be expressed via both a binary and textual format ([" [wat]: https://webassembly.github.io/spec/core/text/index.html [cabi]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/CanonicalABI.md [cm-binary-format]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Binary.md -[wasi-p1]: https://github.com/WebAssembly/WASI/blob/main/legacy/preview1/witx/wasi_snapshot_preview1.witx +[wasi-p1]: https://github.com/WebAssembly/WASI/blob/wasi-0.1/preview1/witx/wasi_snapshot_preview1.witx [wasm-core-spec]: https://webassembly.github.io/spec/core/ ## Q: How can I tell if a WebAssembly binary is a component or a module? diff --git a/component-model/src/running-components.md b/component-model/src/running-components.md index 9e9de6e3..a8eed665 100644 --- a/component-model/src/running-components.md +++ b/component-model/src/running-components.md @@ -2,6 +2,6 @@ There are two standard WIT worlds that runtimes support. These worlds are the [`wasi:cli/command` world](https://github.com/WebAssembly/WASI/blob/main/proposals/cli/wit/command.wit) -and the [`wasi:http/proxy` world](https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/proxy.wit). +and the [`wasi:http/proxy` world](https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/http/wit/proxy.wit). All other WIT worlds and interfaces are considered to be custom. In the following sections, you'll see how to run components that implement either world, as well as how to invoke custom exports. diff --git a/component-model/src/running-components/wasmtime.md b/component-model/src/running-components/wasmtime.md index 4e2bde13..100e5906 100644 --- a/component-model/src/running-components/wasmtime.md +++ b/component-model/src/running-components/wasmtime.md @@ -10,7 +10,7 @@ This page has content for both **WASI 0.2** and **WASI 0.3**. Use the tabs below {{#tab name="WASI 0.2" }} [Wasmtime](https://github.com/bytecodealliance/wasmtime/) is the reference implementation of the Component Model. It supports running components that implement the [`wasi:cli/command` world](https://github.com/WebAssembly/WASI/blob/main/proposals/cli/wit/command.wit) -and serving components that implement the [`wasi:http/proxy` world](https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/proxy.wit). +and serving components that implement the [`wasi:http/proxy` world](https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/http/wit/proxy.wit). Wasmtime can also invoke functions exported from a component. {{#endtab }} {{#tab name="WASI 0.3" }} @@ -52,7 +52,7 @@ See the [Wasmtime guide](https://docs.wasmtime.dev/) for information on granting {{#tabs global="wasi-version" }} {{#tab name="WASI 0.2" }} -You can execute components that implement the [HTTP proxy world](https://github.com/WebAssembly/WASI/blob/main/proposals/http/wit/proxy.wit) with the `wasmtime serve` subcommand. +You can execute components that implement the [HTTP proxy world](https://github.com/WebAssembly/WASI/blob/wasi-0.2/proposals/http/wit/proxy.wit) with the `wasmtime serve` subcommand. [The Wasmtime CLI](https://github.com/bytecodealliance/wasmtime) supports serving these components as of `v18.0.0`. To run a HTTP component with Wasmtime, execute: