Skip to content

Commit e516c56

Browse files
refactor: Revise introduction (#280)
* Revise introduction * Update component-model/src/introduction.md Co-authored-by: Victor Adossi <[email protected]> * More detail on platforms / what APIs are for --------- Co-authored-by: Victor Adossi <[email protected]>
1 parent 7807513 commit e516c56

File tree

3 files changed

+59
-12
lines changed

3 files changed

+59
-12
lines changed

component-model/src/SUMMARY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
- [Introduction](./introduction.md)
55

6-
# Understanding Component Model
6+
# Understanding WebAssembly Components
77

88
- [Why the Component Model?](./design/why-component-model.md)
99
- [Component Model Concepts](./design/component-model-concepts.md)
@@ -13,7 +13,7 @@
1313
- [Packages](./design/packages.md)
1414
- [WIT Reference](./design/wit.md)
1515

16-
# Using Component Model
16+
# Using WebAssembly Components
1717

1818
- [Language Support for Components](./language-support.md)
1919
- [C/C++](./language-support/c.md)

component-model/src/introduction.md

Lines changed: 56 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

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

5+
This documentation is aimed at _users_ of the component model: developers of libraries and applications.
6+
7+
> [!NOTE]
8+
>
9+
> _Compiler and Wasm runtime developers_ can take a look at the [Component Model specification](https://github.com/WebAssembly/component-model) to
10+
> see how to add support for the component model to their project.
11+
12+
## Table of contents
13+
514
| Understanding components | Building components | Using components |
615
|--------------------------|----------------------|-------------------|
716
| [Why Components?] | [C/C++] | [Composing] |
@@ -27,17 +36,55 @@ The WebAssembly Component Model is a broad-reaching architecture for building in
2736
[Running]: ./running-components.md
2837
[Distributing]: ./composing-and-distributing/distributing.md
2938

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.
3539

36-
## Status
40+
## WebAssembly components
41+
42+
As with all programming, the goal of writing a component
43+
is to make new functionality available
44+
by building it out of existing functionality.
45+
46+
A WebAssembly component runs on a _platform_,
47+
which may be a Web browser,
48+
a stand-alone runtime,
49+
or even an operating system (when compiling WebAssembly to an executable).
50+
By running the component, the platform gains the functionality
51+
that the component implements.
52+
Likewise, the platform provides functionality
53+
that code in components can use to interact
54+
with the outside world.
55+
56+
For example:
57+
58+
- A user of the component model can build a component
59+
that converts the system time to another time zone.
60+
- For the component to work as intended, the underlying platform
61+
must provide the component with a means to access
62+
the current system time and the system time zone.
63+
64+
## APIs for building WebAssembly components
65+
66+
In general, a platform that runs components
67+
must provide well-defined APIs for accessing functionality
68+
that components need:
69+
for example, reading from standard input,
70+
accessing environment variables,
71+
or manipulating network sockets.
72+
73+
It's useful to have a standard, shared set of APIs
74+
that WebAssembly components can depend on.
75+
[WASI](https://wasi.dev/) (the WebAssembly System Interface) is a standards-track specification
76+
that defines these APIs.
77+
A system or platform may expose some or all of the WASI APIs to components.
78+
79+
### Status
3780

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://wasi.dev) to stay up to date on the latest releases.
81+
The current stable release of WASI is [WASI 0.2.0](https://github.com/WebAssembly/WASI/pull/577),
82+
which was released on January 25, 2024.
83+
WASI 0.2.0 is [a stable set of WIT definitions](https://github.com/WebAssembly/WASI/tree/main/wasip2)
84+
that components can target.
85+
WASI proposals will continue to evolve and new ones will be introduced;
86+
however, users of the component model can now pin to any stable release >= `v0.2.0`.
87+
The [WASI.dev roadmap](https://wasi.dev/roadmap) tracks upcoming releases.
4188

4289
## Contributing
4390

component-model/src/reference/faq.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ The component is said to "export" the `example-interface` interface, making avai
143143
## Still have questions?
144144

145145
Please contribute to the Component Book by filing your question (or one that you think should be covered here) as
146-
[an issue on GitHub][gh-issues].
146+
[an issue on GitHub][gh-issues-new].
147147

148148
[gh-issues-new]: https://github.com/bytecodealliance/component-docs/issues/new
149149

0 commit comments

Comments
 (0)