Skip to content

Commit 60cff31

Browse files
authored
Add a definition for Preview 2. (#550)
* Add a definition for Preview 2. Add a document defining the criteria for including proposals in Preview 2, as well as defining when Preview 2 is considered launched. And, update the top-level README.md to point to this new document and to reflect the updated Preview 2 plan. * Rename "phase 4 acceptance criteria" to "portability criteria". * Update README.md * Update README.md
1 parent 9ab5446 commit 60cff31

File tree

2 files changed

+82
-12
lines changed

2 files changed

+82
-12
lines changed

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,23 @@
44

55
![WASI](WASI.png)
66

7-
The WebAssembly System Interface is not a monolithic standard system interface,
8-
but is instead a modular collection of standardized APIs. None of the APIs are
9-
required to be implemented to have a compliant runtime. Instead, host
10-
environments can choose which APIs make sense for their use cases.
7+
The WebAssembly System Interface (WASI) is a set of APIs for WASI being
8+
developed for eventual standardization by the WASI Subgroup, which is a
9+
subgroup of the WebAssembly Community Group.
1110

12-
---
13-
## Important Note: WASI is in transition
11+
WASI started with launching what is now called [Preview 1], an API using
12+
the witx IDL, and it is now widely used. Its major incluences are POSIX and
13+
CloudABI.
1414

15-
WASI is transitioning away from the `witx` format and its early experimental ABI. We are transitioning to Interface Types using the `wit` format and the canonical ABI.
15+
[WASI Preview 2] is now in development, which is a modular collection of
16+
APIs defined with the [Wit IDL], and it incorporates many of the lessons
17+
learned from Preview 1, including adding support for a wider range of
18+
source languages, modularity, a more expressive type system,
19+
virtualizability, and more.
1620

17-
All new API proposals should use the new format and the new repo structure that is shown in the [proposal template](https://github.com/WebAssembly/wasi-proposal-template).
18-
19-
See the [Wit in WASI](docs/WitInWasi.md) document for more information about using Wit for WASI proposals.
20-
21-
---
21+
[Preview 1]: https://github.com/WebAssembly/WASI/tree/main/legacy/README.md
22+
[WASI Preview 2]: https://github.com/WebAssembly/WASI/tree/main/preview2/README.md
23+
[Wit IDL]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
2224

2325
## Find the APIs
2426

@@ -33,6 +35,10 @@ and high-level goals.
3335
If you would like to create a new proposal, get started with our
3436
[Contributing guide](Contributing.md).
3537

38+
All new API proposals should use the new format and the new repo structure that is shown in the [proposal template](https://github.com/WebAssembly/wasi-proposal-template).
39+
40+
See the [Wit in WASI](docs/WitInWasi.md) document for more information about using Wit for WASI proposals.
41+
3642
## WASI High Level Goals
3743

3844
(In the spirit of [WebAssembly's High-Level Goals](https://github.com/WebAssembly/design/blob/main/HighLevelGoals.md).)
@@ -129,3 +135,10 @@ API in WASI, so we don't need to exclude APIs just because some host
129135
environments can't implement them. We prefer APIs which can run across
130136
a wide variety of engines when feasible, but we'll ultimately decide
131137
whether something is "portable enough" on an API-by-API basis.
138+
139+
### Modularity
140+
141+
WASI will include many interfaces that are not appropriate for every host
142+
environment, so WASI uses the component model's worlds mechanism to allow
143+
specific sets of APIs to be described which meet the needs of different
144+
environments.

preview2/README.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# WASI Preview 2
2+
3+
At this time, Preview 2 is in development and has not yet launched.
4+
5+
## Launch criteria
6+
7+
WASI Preview 2 will be considered launched when at least two independent
8+
proposals which define worlds, and all their dependencies, have met the
9+
requirements for inclusion listed below, and the WASI Subgroup has voted
10+
to launch it.
11+
12+
## Introduction
13+
14+
*The following is a draft of an introduction for WASI Preview 2 when it launches.*
15+
16+
WASI Preview 2 represents a major milestone for WASI. It marks the moment
17+
when WASI has fully rebased on the [Wit IDL] and the [component model]
18+
type system and semantics, making it modular, fully virtualizable, and
19+
accessible to a wide variety of source languages.
20+
21+
[Wit IDL]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
22+
[component model]: https://github.com/WebAssembly/component-model
23+
24+
## WASI Preview 2 Contents
25+
26+
WASI Preview 2 contains the following APIs:
27+
28+
| Proposal | Versions |
29+
| ------------------------------------------------------------------------------ | -------- |
30+
31+
## Proposal requirements for inclusion in WASI Preview 2.
32+
33+
To be included in Preview 2, a proposal must:
34+
35+
- Reach phase 3 in the [WASI Subgroup Phase Process]
36+
- Satisfy its own [portability criteria]
37+
- Be voted for inclusion by the WASI Subgroup
38+
39+
Proposals may be added to WASI Preview 2 at any time until WASI Preview 3
40+
is launched.
41+
42+
## Witx and Wit
43+
44+
Witx files can be derived from Wit files according to the Canonical ABI. Wasm
45+
engines can implement single-module components using just these derived Witx files
46+
and their existing Witx machinery.
47+
48+
## Looking forward to Preview 3
49+
50+
Preview 3 will add the new `stream` and `future` keywords. The
51+
release criteria of Preview 3 will include that performance will be
52+
measured and addressed.
53+
54+
[WASI Subgroup Phase Process]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process
55+
[portability criteria]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#2-feature-description-available-wasi-subgroup
56+
[worlds]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-worlds
57+
[launch criteria]: #wasi-preview-2-launch-criteria

0 commit comments

Comments
 (0)