Skip to content

Commit fc5435f

Browse files
committed
refactor chapter 6 into 1 chapter for running and 1 for composing/distributing
1 parent e1e9522 commit fc5435f

File tree

13 files changed

+28
-19
lines changed

13 files changed

+28
-19
lines changed

component-model/book.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ title = "The WebAssembly Component Model"
99
git-repository-url = "https://github.com/bytecodealliance/component-docs/tree/main/component-model"
1010
edit-url-template = "https://github.com/bytecodealliance/component-docs/tree/main/component-model/{path}"
1111
additional-css = ["theme/head.hbs"]
12+
[output.html.redirect]
13+
"/creating-and-consuming/composing.html" = "/composing-and-distributing/composing.html"
14+
"/creating-and-consuming/distributing.html" = "/composing-and-distributing/distributing.html"
15+
"/creating-and-consuming/running.html" = "/running-components.html"
16+
"/creating-and-consuming/authoring.html" = "/language-support.html"
17+
"/creating-and-consuming.html" = "/language-support.html"
18+
"/runtimes/wasmtime.html" = "/running-components/wasmtime.html"
19+
"/runtimes/jco.html" = "/running-components/jco.html"
1220

1321
[preprocessor.alerts]
1422

component-model/src/SUMMARY.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,14 @@
2222
- [JavaScript](./language-support/javascript.md)
2323
- [Python](./language-support/python.md)
2424
- [Rust](./language-support/rust.md)
25-
- [Creating and Consuming Components](./creating-and-consuming.md)
26-
- [Composing Components](./creating-and-consuming/composing.md)
27-
- [Distributing and Fetching Components and WIT](./creating-and-consuming/distributing.md)
25+
- [Running Components](./running-components.md)
26+
- [Wasmtime](./running-components/wasmtime.md)
27+
- [jco](./running-components/jco.md)
28+
- [Consuming and Distributing Components](./composing-and-distributing.md)
29+
- [Composing Components](./composing-and-distributing/composing.md)
30+
- [Distributing and Fetching Components and WIT](./composing-and-distributing/distributing.md)
2831
- [Tutorial](./tutorial.md)
2932

30-
# Runtime Support
31-
32-
- [Wasmtime](./runtimes/wasmtime.md)
33-
- [jco](./runtimes/jco.md)
34-
3533
# Advanced Topics
3634

3735
- [Canonical ABI](./advanced/canonical-abi.md)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
# Creating and Consuming Components
1+
# Composing and Distributing Components
22

33
The component model defines how components interface to each other and to hosts. This section describes how to work with components - from authoring them in custom code or by composing existing components, through to using them in applications and distributing them via registries.
File renamed without changes.
File renamed without changes.

component-model/src/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ The WebAssembly Component Model is a broad-reaching architecture for building in
2323
[Python]: ./language-support/python.md
2424
[Rust]: ./language-support/rust.md
2525

26-
[Composing]: ./creating-and-consuming/composing.md
27-
[Running]: ./creating-and-consuming/running.md
28-
[Distributing]: ./creating-and-consuming/distributing.md
26+
[Composing]: ./composing-and-distributing/composing.md
27+
[Running]: ./running-components/running.md
28+
[Distributing]: ./composing-and-distributing/distributing.md
2929

3030
> [!NOTE]
3131
>This documentation is aimed at _users_ of the component model: developers of libraries and applications.

component-model/src/language-support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ working with WebAssembly modules and components.
8989
You can "run" a component by calling one of its exports. Hosts and runtimes often only support
9090
running components with certain exports. The [`wasmtime`](https://github.com/bytecodealliance/wasmtime) CLI can only run "command" components, so in
9191
order to run the `add` function above, it first must be composed with a primary "command" component
92-
that calls it. See [documentation on running components](./runtimes/wasmtime.md) for more details.
92+
that calls it. See [documentation on running components](./running-components/wasmtime.md) for more details.

component-model/src/language-support/javascript.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ download a pre-existing interface that defines what your component should do.
5454
The [`adder` world][adder-world] contains an interface with a single `add` function that sums two numbers:
5555

5656
```wit
57-
{{#include ../../exmaples/tutorial/wit/adder/world.wit}}
57+
{{#include ../../examples/tutorial/wit/adder/world.wit}}
5858
```
5959

6060
> [!NOTE]

component-model/src/language-support/rust.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ world root {
207207
```
208208

209209
As the import is unfulfilled, the `calculator.wasm` component could not run by itself in its current form. To fulfill the `add` import, so that
210-
only `calculate` is exported, you would need to [compose the `calculator.wasm` with some `adder.wasm` into a single, self-contained component](../creating-and-consuming/composing.md).
210+
only `calculate` is exported, you would need to [compose the `calculator.wasm` with some `adder.wasm` into a single, self-contained component](../composing-and-distributing/composing.md).
211211

212212
## Creating a command component with `cargo component`
213213

@@ -284,7 +284,7 @@ As mentioned above, `cargo component build` doesn't generate a WIT file for a co
284284
}
285285
```
286286
287-
5. [Compose the command component with the `.wasm` components that implement the imports.](../creating-and-consuming/composing.md)
287+
5. [Compose the command component with the `.wasm` components that implement the imports.](../composing-and-distributing/composing.md)
288288
289289
6. Run the composed component:
290290
@@ -488,7 +488,7 @@ To use the calculator engine in another component, that component must import th
488488
}
489489
```
490490

491-
You can now build the command component and [compose it with the `.wasm` component that implements the resource.](../creating-and-consuming/composing.md). You can then run the composed command with `wasmtime run`.
491+
You can now build the command component and [compose it with the `.wasm` component that implements the resource.](../composing-and-distributing/composing.md). You can then run the composed command with `wasmtime run`.
492492

493493
### Implementing and exporting a resource implementation in a host
494494

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Running Components
2+
3+
There are two standard wit worlds that runtimes support. These worlds are the [`wasi:cli/command` world](https://github.com/WebAssembly/wasi-cli/blob/main/wit/command.wit) and the [`wasi:http/proxy` world](https://github.com/WebAssembly/wasi-http/blob/main/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.

0 commit comments

Comments
 (0)