Skip to content

Commit da0727c

Browse files
itowlsonvados-cosmonickate-goldenring
authored
Clarify more concisely how concepts relate to each other (#64)
* refactor: add overview to introduction Signed-off-by: Victor Adossi <[email protected]> Co-authored-by: itowlson <[email protected]> * fix: phrasing for released versions in intro Co-authored-by: Kate Goldenring <[email protected]> * refactor: create new component model concepts section Signed-off-by: Victor Adossi <[email protected]> * fix: capitalization Co-authored-by: Kate Goldenring <[email protected]> * fix: version tag Co-authored-by: Kate Goldenring <[email protected]> * fix: wasi dev link Signed-off-by: Victor Adossi <[email protected]> --------- Signed-off-by: Victor Adossi <[email protected]> Co-authored-by: Victor Adossi <[email protected]> Co-authored-by: Victor Adossi <[email protected]> Co-authored-by: Kate Goldenring <[email protected]>
1 parent 5c20151 commit da0727c

File tree

4 files changed

+49
-8
lines changed

4 files changed

+49
-8
lines changed

component-model/src/SUMMARY.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
# Understanding Component Model
77

88
- [Why the Component Model?](./design/why-component-model.md)
9-
- [Components](./design/components.md)
10-
- [Interfaces](./design/interfaces.md)
11-
- [Worlds](./design/worlds.md)
12-
- [WIT](./design/wit.md)
13-
- [Packages](./design/packages.md)
9+
- [Component Model Concepts](./design/component-model-concepts.md)
10+
- [Components](./design/components.md)
11+
- [Interfaces](./design/interfaces.md)
12+
- [Worlds](./design/worlds.md)
13+
- [Packages](./design/packages.md)
14+
- [WIT Reference](./design/wit.md)
1415

1516
# Using Component Model
1617

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## Component Model Concepts
2+
3+
This section introduces the core concepts and [rationale](./why-component-model.md) of the component model.
4+
5+
* A [WebAssembly Component](./components.md) is the next evolution of core WebAssembly binaries.
6+
* WebAssembly components are *nestable* -- they may contain one or more core modules and/or sub-components composed together.
7+
* The Component Model extends core WebAssembly by introducing higher level types and interface-driven development
8+
* [WebAssembly Interface Types (WIT)][wit] is the [IDL (Interface Definition Language)][wiki-idl] used to formally define functionality for WebAssembly modules.
9+
* With WIT, WebAssembly components gain the ability to conform an language-agnostic and encode that support, so any WebAssembly component binary can be interrogated *and* executed.
10+
* An [Interface](./interfaces.md) describes the types and functions used for a specific, focused bit of functionality.
11+
* A [World](./worlds.md) assembles interfaces to express what features a component offers, and what features it depends on.
12+
* A [Package](./packages.md) is a set of WIT files containing a related set of interfaces and worlds.
13+
* The Component Model introduces the idea of a "platform" to core WebAssembly -- enabling the structured, standardized use of "host" functionality for WebAssembly "guest"s.
14+
* The WebAssembly System Interface (WASI) defines in WIT a family of interfaces for common system-level functions.
15+
* WASI defines common execution environments such as the command line (`wasi:cli`) or a HTTP server (`wasi:http`).
16+
* The Component Model introducs makes core WebAssembly composable -- components that provide functionality and those that use them can be composed together into *one* resulting component
17+
18+
> [!NOTE]
19+
> The Component Model is stewarded by the Bytecode Alliance and designed [in the open][cm-repo].
20+
>
21+
> See the [`WebAssembly/component-model`][cm-repo] repository for [Goals][goals],[use cases][use-cases], and [high level design choices][design-choices].
22+
23+
[cm-repo]: https://github.com/WebAssembly/component-model
24+
[wiki-idl]: https://en.wikipedia.org/wiki/Web_IDL
25+
[goals]: https://github.com/WebAssembly/component-model/blob/main/design/high-level/Goals.md
26+
[use-cases]: https://github.com/WebAssembly/component-model/blob/main/design/high-level/UseCases.md
27+
[design-choices]: https://github.com/WebAssembly/component-model/blob/main/design/high-level/Choices.md
28+
[wit]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
29+
30+
[!NOTE]: #

component-model/src/introduction.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Home
22

3-
The WebAssembly Component Model is a broad-reaching architecture for building interoperable Wasm libraries, applications, and environments.
3+
The WebAssembly Component Model is a broad-reaching architecture for building interoperable WebAssembly libraries, applications, and environments.
44

55
| Understanding components | Building components | Using components |
66
|--------------------------|----------------------|-------------------|
@@ -27,14 +27,22 @@ The WebAssembly Component Model is a broad-reaching architecture for building in
2727
[Running]: ./creating-and-consuming/running.md
2828
[Distributing]: ./creating-and-consuming/distributing.md
2929

30-
> This documentation is aimed at _users_ of the component model: developers of libraries and applications. _Compiler and Wasm runtime developers_ can take a look at the [Component Model specification](https://github.com/WebAssembly/component-model) to see how to add support for the component model to their project.
30+
> [!NOTE]
31+
>This documentation is aimed at _users_ of the component model: developers of libraries and applications.
32+
>
33+
> _Compiler and Wasm runtime developers_ can take a look at the [Component Model specification](https://github.com/WebAssembly/component-model) to
34+
> see how to add support for the component model to their project.
3135
3236
## Status
3337

34-
[WASI 0.2.0 was released](https://github.com/WebAssembly/WASI/pull/577) Jan 25, 2024, providing a stable release of WASI and the component model. This [is a stable set of WIT definitions](https://github.com/WebAssembly/WASI/tree/main/wasip2) 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 the stable 0.2.0 release.
38+
[WASI 0.2.0 was released](https://github.com/WebAssembly/WASI/pull/577) Jan 25, 2024, providing a stable release of WASI and the component model.
39+
This [is a stable set of WIT definitions](https://github.com/WebAssembly/WASI/tree/main/wasip2) that components can target. WASI proposals will
40+
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`. See [WASI.dev](https://www.wasi.dev) to stay up to date on the latest releases.
3541

3642
## Contributing
3743

3844
If you find a mistake, omission, ambiguity, or other problem, please let us know via [GitHub issues](https://github.com/bytecodealliance/component-docs/issues).
3945

4046
If you'd like to contribute content to the guide, please see the [contribution guide](https://github.com/bytecodealliance/component-docs/blob/main/CONTRIBUTING.md) for information on how to contribute.
47+
48+
[!NOTE]: #

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,3 +559,5 @@ If you are hosting a Wasm runtime, you can export a resource from your host for
559559
[cargo-component]: https://github.com/bytecodealliance/cargo-component
560560
[cargo-component-install]: https://github.com/bytecodealliance/cargo-component#install
561561
[docs-adder]: https://github.com/bytecodealliance/component-docs/tree/main/component-model/examples/tutorial/wit/adder/world.wit
562+
[!NOTE]: #
563+
[!WARNING]: #

0 commit comments

Comments
 (0)