Skip to content

Commit 39f3acf

Browse files
committed
Update README.md and other docs based on WASI 0.3 release
1 parent 3f008a9 commit 39f3acf

4 files changed

Lines changed: 50 additions & 43 deletions

File tree

README.md

Lines changed: 28 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
11
# Component Model design and specification
22

3-
This repository is where the component model is being standardized. For a more
3+
This repository is where the Component Model is being standardized. For a more
44
user-focused explanation, take a look at the **[Component Model Documentation]**.
55

6-
This repository contains the high-level [goals], [use cases], [design choices]
7-
and [FAQ] of the Component Model as well as more-detailed, low-level explainer
8-
docs describing the [IDL], [text format], [binary format], [concurrency model]
9-
and [Canonical ABI].
6+
This repository contains:
7+
* high-level [goals], [use cases], [design choices] and [FAQ] docs
8+
* low-level [WIT], [text format], [binary format], [concurrency] and [ABI] docs
9+
* a growing [WAST test suite]
1010

11-
In the future, this repository will additionally contain a [formal spec],
12-
reference interpreter and test suite.
11+
In the future, this repository will additionally contain a [formal spec] and a
12+
reference interpreter.
1313

1414
## Milestones
1515

16-
The Component Model is currently being incrementally developed as part of [WASI]
17-
"Developer Preview" releases. The features enabled by default in a Developer
18-
Preview release are kept stable so that they can be used outside the browser in
19-
production settings to collect feedback that informs subsequent iterations
20-
leading up to the standard 1.0 release.
16+
The Component Model is currently being developed incrementally as part of [WASI]
17+
"Developer Preview" releases. The Component Model features enabled as part of a
18+
WASI Developer Preview release are kept stable by producer and consumer tools so
19+
that they can be used outside the browser in production settings to collect
20+
read-world feedback.
2121

22-
The current Developer Releases are:
23-
* 0.2: the initial release including ...
24-
* 0.3: adding ...
22+
The current WASI Developer Preview releases are:
23+
* 0.2.0: the first release based on the Component Model; includes
24+
shared-nothing and shared-everything [linking], a variety of high-level
25+
value types, `resource` types with handles, and [WIT].
26+
* 0.3.0: adds native [concurrency] support to the Component Model and [WIT];
27+
includes `async` functions, `stream`s and `future`s as well as new
28+
[ABI] built-in functions; additions are marked by the 🔀 emoji
29+
throughout the repo.
2530

26-
The subsequent [WASI Preview 3] milestone will be
27-
primarily concerned with the addition of [async and thread support][Concurrency
28-
Model].
31+
Subsequent WASI Developer Preview releases will include other emoji-[gated
32+
features] such as cooperative threads (🧵).
2933

3034
## Contributing
3135

@@ -39,12 +43,15 @@ To contribute to any of these repositories, see the Community Group's
3943
[Use Cases]: design/high-level/UseCases.md
4044
[Design Choices]: design/high-level/Choices.md
4145
[FAQ]: design/high-level/FAQ.md
42-
[IDL]: design/mvp/WIT.md
46+
[WIT]: design/mvp/WIT.md
4347
[Text Format]: design/mvp/Explainer.md
4448
[Binary Format]: design/mvp/Binary.md
45-
[Concurrency Model]: design/mvp/Concurrency.md
46-
[Canonical ABI]: design/mvp/CanonicalABI.md
49+
[Concurrency]: design/mvp/Concurrency.md
50+
[ABI]: design/mvp/CanonicalABI.md
51+
[WAST test suite]: test/
4752
[formal spec]: spec/
53+
[Linking]: design/mvp/Linking.md
54+
[Gated Features]: design/mvp/Explainer.md#gated-features
4855
[W3C WebAssembly Community Group]: https://www.w3.org/community/webassembly/
4956
[Contributing Guidelines]: https://webassembly.org/community/contributing/
5057
[WASI]: https://github.com/webAssembly/wasi

design/mvp/Concurrency.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Concurrency Explainer
22

3-
This document contains a high-level summary of the native concurrency support
4-
added as part of [WASI Preview 3], providing background for understanding the
5-
definitions in the [WIT], [AST explainer], [binary format] and [Canonical ABI
6-
explainer] documents that are gated by the 🔀 (async) and 🧵 (threading) emojis.
3+
This document contains a high-level summary of the native concurrency support,
4+
providing background for understanding the definitions in the [WIT], [AST
5+
explainer], [binary format] and [Canonical ABI explainer] documents that are
6+
gated by the 🔀 (async) and 🧵 (threading) emojis.
77

88
* [Goals](#goals)
99
* [Summary](#summary)
@@ -35,8 +35,8 @@ explainer] documents that are gated by the 🔀 (async) and 🧵 (threading) emo
3535
## Goals
3636

3737
Refining the Component Model's high-level [goals](../high-level/Goals.md) and
38-
[use cases](../high-level/UseCases.md), [WASI Preview 3] adds the following
39-
concurrency-specific goals and use cases:
38+
[use cases](../high-level/UseCases.md), with the release of [WASI] 0.3, the
39+
following concurrency-specific goals and use cases are added:
4040

4141
* Integrate with idiomatic source-language concurrency features including:
4242
* `async` functions in languages like C#, JS, Python, Rust and Swift
@@ -92,7 +92,7 @@ invariant is necessary to allow non-`async` component exports to be called in
9292
synchronous contexts (like event listeners, callbacks, getters, setters and
9393
constructors).
9494

95-
The new async ABI can be used alongside or instead of the existing Preview 2
95+
The new async ABI can be used alongside or instead of the existing [WASI] 0.2
9696
"sync ABI" to call or implement any `async`-typed functions. When *calling* an
9797
imported function via the async ABI, if the `async` callee [blocks](#blocking),
9898
control flow is returned immediately to the caller, and the callee continues
@@ -108,7 +108,7 @@ can compile directly to components exporting `async` functions without having
108108
to be rewritten to use source-language concurrency mechanisms (like callbacks,
109109
`async`/`wait`, coroutines, etc). For example, traditional C programs with a
110110
`main()` and calls to `read()`, `write()` and `select()` can run without change
111-
in the Preview 3 `wasi:cli/command` world, which exports `run: async func() ->
111+
in the [WASI] 0.3 `wasi:cli/command` world, which exports `run: async func() ->
112112
result`. Thus, `async` in WIT does not require the same kind of transitive
113113
source-code changes as source-level `async` in languages like C#, Python, JS,
114114
Rust and Dart.
@@ -911,9 +911,10 @@ the Component Model has [Component Invariant] #2. This is enforced by the
911911
[Canonical ABI](CanonicalABI.md#embedding) using strategically placed traps and
912912
boolean flags on component instances.
913913

914-
With Preview 3, a desirable outcome is that if our component imports `imp` and
915-
exports `exp` as `async` functions, then the following JS code could run the
916-
two `exp` calls concurrently just like if they were JS `async` functions:
914+
With native concurrency support, what we'd naturally expect is that if our
915+
component imports `imp` and exports `exp` as `async` functions, then the
916+
following JS code could run the two `exp` calls concurrently just like if they
917+
were JS `async` functions:
917918
```js
918919
import source component from './component.wasm';
919920
async function imp() {
@@ -1003,7 +1004,7 @@ task" to which work can be dispatched (e.g., via the `setInterval()` or
10031004
concurrency], these background tasks are new task tree roots (siblings to the
10041005
roots created when component exports are called by the host).
10051006

1006-
As a Preview 3 follow-up [TODO](#TODO), component type definitions should be
1007+
As a post-0.3.0 follow-up [TODO](#TODO), component type definitions should be
10071008
extended to allow an `async` effect that declares that component instantiation
10081009
is allowed to [block](#blocking). This would be necessary to implement, e.g.,
10091010
JS [top-level `await`] or I/O in C++ constructors executing during `start`.
@@ -1013,7 +1014,7 @@ JS [top-level `await`] or I/O in C++ constructors executing during `start`.
10131014

10141015
At an ABI level, native async in the Component Model defines for every
10151016
`async`-typed function a non-blocking core function signature that can be
1016-
used instead of or in addition to the existing (Preview-2-defined) synchronous
1017+
used instead of or in addition to the existing ([WASI] 0.2) synchronous
10171018
core function signature. This non-blocking core function signature is intended
10181019
to be called or implemented by generated bindings which then map the low-level
10191020
core async protocol to the languages' higher-level native concurrency features.
@@ -1406,7 +1407,7 @@ instance lifetimes are flexible in this manner and don't have an obvious end
14061407
conventionally ends right after `main()` returns), the host still needs to
14071408
understand the expectations of component authors to enable portability.
14081409

1409-
Before the addition of native concurrency support in Preview 3, a natural
1410+
Before the addition of native concurrency support in [WASI] 0.3, a natural
14101411
expectation is that, in the absence of atypical scenarios like timeouts or quota
14111412
exhaustion, a component author can expect that their component instance will not
14121413
be abruptly terminated during the execution of contained Core WebAssembly code.
@@ -1463,7 +1464,7 @@ waiting on `async` operations to complete.
14631464
To resolve this tension, threads are implicitly distinguished by a "keep-alive"
14641465
flag that determines whether the expectation is that the existence of the thread
14651466
is intended to keep the containing component instance alive. In the initial
1466-
release of Preview 3, this "keep-alive" flag is default *set* for the [implicit
1467+
release of [WASI] 0.3, this "keep-alive" flag is default *set* for the [implicit
14671468
thread](#summary) created for a task and default *cleared* for the explicit
14681469
threads created by `thread.new-indirect`. In particular, this means that an
14691470
`async callback`-lifted function will keep its containing component instance
@@ -1496,8 +1497,7 @@ the whole tree would be kept alive.
14961497

14971498
Native async support is being proposed incrementally. The following features
14981499
will be added in future chunks roughly in the order listed to complete the full
1499-
"async" story, with a TBD cutoff between what's in [WASI Preview 3] and what
1500-
comes after:
1500+
concurency story:
15011501
* remove the temporary trap mentioned above that occurs when a `read` and
15021502
`write` of a stream/future happen from within the same component instance
15031503
* zero-copy forwarding/splicing
@@ -1613,7 +1613,7 @@ comes after:
16131613
[wasm-gc]: https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md
16141614
[wasi-libc]: https://github.com/WebAssembly/wasi-libc
16151615

1616-
[WASI Preview 3]: https://github.com/WebAssembly/WASI/tree/main/wasip2#looking-forward-to-preview-3
1616+
[WASI]: https://github.com/WebAssembly/WASI
16171617
[Runtime Instantiation]: https://github.com/WebAssembly/component-model/issues/423
16181618

16191619
[Top-level `await`]: https://github.com/tc39/proposal-top-level-await

design/mvp/Explainer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ have been implemented and are included in the [WASI] 0.2 Developer Preview
5353
release. The WASI 0.3 Developer Preview release additionally includes the
5454
features gated by 🔀.
5555

56-
The other features, in various stages of implementation, polish and release, are
56+
The other features, in various stages of implementation, polish and release are
5757
gated by the following emojis and, when ready, may be included in subsequent
58-
WASI Developer Preview (minor) release:
58+
WASI Developer Preview minor releases:
5959
* 🪙: value imports/exports and component-level start function
6060
* 🪺: nested namespaces and packages in import/export names
6161
* 🚝: enabling more canonical ABI options on more async-related builtins

design/mvp/Linking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ address this use case *above* the Component Model, using an interface defined
290290
in [WIT] and allowing different platforms and applications to tailor the
291291
interface to their needs.
292292

293-
For example, using the Preview 2 feature set of Component Model, a simple
293+
For example, using the current feature set of the Component Model, a simple
294294
dynamic plugin interface might look like the following:
295295
```wit
296296
interface plugin-loader {
@@ -314,7 +314,7 @@ plugins (e.g., on upload to the store or registry) into a native shared object
314314
or DLL that can be efficiently loaded at runtime.
315315

316316
(There are a number of ways to improve upon this basic design with additional
317-
post-Preview 2 features of WIT and the Component Model.)
317+
future features of WIT and the Component Model.)
318318

319319

320320
[Canonical ABI]: CanonicalABI.md

0 commit comments

Comments
 (0)