Skip to content

Commit 7807513

Browse files
refactor: running components chapter (#277)
* remove 6.1 'Authoring Components' section * running.md moved to wasmtime.md section and updated for custom invocations * refactor chapter 6 into 1 chapter for running and 1 for composing/distributing * nits * refactor: custom export comment --------- Co-authored-by: Victor Adossi <[email protected]>
1 parent dc66801 commit 7807513

File tree

15 files changed

+42
-62
lines changed

15 files changed

+42
-62
lines changed

component-model/book.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,15 @@ git-repository-url = "https://github.com/bytecodealliance/component-docs/tree/ma
1010
edit-url-template = "https://github.com/bytecodealliance/component-docs/tree/main/component-model/{path}"
1111
additional-css = ["theme/head.hbs"]
1212

13+
[output.html.redirect]
14+
"/creating-and-consuming/composing.html" = "/composing-and-distributing/composing.html"
15+
"/creating-and-consuming/distributing.html" = "/composing-and-distributing/distributing.html"
16+
"/creating-and-consuming/running.html" = "/running-components.html"
17+
"/creating-and-consuming/authoring.html" = "/language-support.html"
18+
"/creating-and-consuming.html" = "/language-support.html"
19+
"/runtimes/wasmtime.html" = "/running-components/wasmtime.html"
20+
"/runtimes/jco.html" = "/running-components/jco.html"
21+
1322
[preprocessor.alerts]
1423

1524
[output.linkcheck]

component-model/src/SUMMARY.md

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +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-
- [Authoring Components](./creating-and-consuming/authoring.md)
27-
- [Composing Components](./creating-and-consuming/composing.md)
28-
- [Running Components](./creating-and-consuming/running.md)
29-
- [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)
3031
- [Tutorial](./tutorial.md)
3132

32-
# Runtime Support
33-
34-
- [Wasmtime](./runtimes/wasmtime.md)
35-
- [jco](./runtimes/jco.md)
36-
3733
# Advanced Topics
3834

3935
- [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.

component-model/src/creating-and-consuming/composing.md renamed to component-model/src/composing-and-distributing/composing.md

File renamed without changes.

component-model/src/creating-and-consuming/distributing.md renamed to component-model/src/composing-and-distributing/distributing.md

File renamed without changes.

component-model/src/creating-and-consuming/authoring.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

component-model/src/creating-and-consuming/running.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

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.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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +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](./creating-and-consuming/running.md) for
93-
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]

0 commit comments

Comments
 (0)