From d291febfec37f5d3635058a08557e7a828007827 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 10 Jul 2023 15:41:18 -0700 Subject: [PATCH 1/4] 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. --- README.md | 37 +++++++++++++++++++++++++------------ preview2/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 12 deletions(-) create mode 100644 preview2/README.md diff --git a/README.md b/README.md index 2217a7444..98f9c3879 100644 --- a/README.md +++ b/README.md @@ -4,21 +4,23 @@ ![WASI](WASI.png) -The WebAssembly System Interface is not a monolithic standard system interface, -but is instead a modular collection of standardized APIs. None of the APIs are -required to be implemented to have a compliant runtime. Instead, host -environments can choose which APIs make sense for their use cases. +The WebAssembly System Interface (WASI) is a set of APIs for WASI being +developed for eventual standardization by the WASI Subgroup, which is a +subgroup of the WebAssembly Community Group. ---- -## Important Note: WASI is in transition +WASI started with launching what is now called [Preview 1], an API using +the witx IDL, and it is now widely used. Its major incluences are POSIX and +CloudABI. -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. +[WASI Preview 2] is now in development, which is a modular collection of +APIs defined with the [Wit IDL], and it incorporates many of the lessons +learned from Preview 1, including adding support for a wider range of +source languages, modularity, a more expressive type system, +virtualizability, and more. -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). - -See the [Wit in WASI](docs/WitInWasi.md) document for more information about using Wit for WASI proposals. - ---- +[Preview 1]: https://github.com/WebAssembly/WASI/tree/main/legacy/README.md +[WASI Preview 2]: https://github.com/WebAssembly/WASI/tree/main/preview2/README.md +[Wit IDL]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md ## Find the APIs @@ -33,6 +35,10 @@ and high-level goals. If you would like to create a new proposal, get started with our [Contributing guide](Contributing.md). +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). + +See the [Wit in WASI](docs/WitInWasi.md) document for more information about using Wit for WASI proposals. + ## WASI High Level Goals (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 environments can't implement them. We prefer APIs which can run across a wide variety of engines when feasible, but we'll ultimately decide whether something is "portable enough" on an API-by-API basis. + +### Modularity + +WASI will include many interfaces that are not appropriate for every host +environment, so WASI uses the component model's worlds mechanism to allow +specific sets of APIs to be described which meet the needs of different +environments. diff --git a/preview2/README.md b/preview2/README.md new file mode 100644 index 000000000..8f64dc766 --- /dev/null +++ b/preview2/README.md @@ -0,0 +1,45 @@ +# WASI Preview 2 + +At this time, Preview 2 is in development and has not yet launched. + +## Launch criteria + +WASI Preview 2 will be considered launched when at least two independent +proposals which define worlds, and all their dependencies, have met the +requirements for inclusion listed below, and the WASI Subgroup has voted +to launch it. + +## Introduction + +*The following is a draft of an introduction for WASI Preview 2 when it launches.* + +WASI Preview 2 represents a major milestone for WASI. It marks the moment +when WASI has fully rebased on the [Wit IDL] and the [component model] +type system and semantics, making it modular, fully virtualizable, and +accessible to a wide variety of source languages. + +[Wit IDL]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md +[component model]: https://github.com/WebAssembly/component-model + +## WASI Preview 2 Contents + +WASI Preview 2 contains the following APIs: + +| Proposal | Versions | +| ------------------------------------------------------------------------------ | -------- | + +## Proposal requirements for inclusion in WASI Preview 2. + +To be included in Preview 2, a proposal must: + + - Reach phase 3 in the [WASI Subgroup Phase Process] + - Satisfy its own [phase 4 acceptance criteria] + - Be voted for inclusion by the WASI Subgroup + +Proposals may be added to WASI Preview 2 at any time until WASI Preview 3 +is launched. + +[WASI Subgroup Phase Process]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process +[phase 4 acceptance criteria]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#2-feature-description-available-wasi-subgroup +[worlds]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-worlds +[launch criteria]: #wasi-preview-2-launch-criteria From 2539a1babefaef39a2093f5e2422839a766de7ca Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 7 Aug 2023 14:10:13 -0700 Subject: [PATCH 2/4] Rename "phase 4 acceptance criteria" to "portability criteria". --- preview2/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/preview2/README.md b/preview2/README.md index 8f64dc766..a44fe4850 100644 --- a/preview2/README.md +++ b/preview2/README.md @@ -33,13 +33,13 @@ WASI Preview 2 contains the following APIs: To be included in Preview 2, a proposal must: - Reach phase 3 in the [WASI Subgroup Phase Process] - - Satisfy its own [phase 4 acceptance criteria] + - Satisfy its own [portability criteria] - Be voted for inclusion by the WASI Subgroup Proposals may be added to WASI Preview 2 at any time until WASI Preview 3 is launched. [WASI Subgroup Phase Process]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process -[phase 4 acceptance criteria]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#2-feature-description-available-wasi-subgroup +[portability criteria]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#2-feature-description-available-wasi-subgroup [worlds]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-worlds [launch criteria]: #wasi-preview-2-launch-criteria From 778c9310012b5525f00c7d7cd75d83f52031ccac Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 Sep 2023 21:45:24 -0700 Subject: [PATCH 3/4] Update README.md --- preview2/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/preview2/README.md b/preview2/README.md index a44fe4850..71a72ebd3 100644 --- a/preview2/README.md +++ b/preview2/README.md @@ -39,6 +39,12 @@ To be included in Preview 2, a proposal must: Proposals may be added to WASI Preview 2 at any time until WASI Preview 3 is launched. +## Looking forward to Preview 3 + +Preview 3 will add the new `stream` and `future` keywords. The +release criteria of Preview 3 will include that performance will be +measured and addressed. + [WASI Subgroup Phase Process]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process [portability criteria]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#2-feature-description-available-wasi-subgroup [worlds]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md#wit-worlds From 25e8370173de64a893b1ff74d8a41ccc39660a17 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Wed, 6 Sep 2023 21:50:55 -0700 Subject: [PATCH 4/4] Update README.md --- preview2/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/preview2/README.md b/preview2/README.md index 71a72ebd3..25d3c9df0 100644 --- a/preview2/README.md +++ b/preview2/README.md @@ -39,6 +39,12 @@ To be included in Preview 2, a proposal must: Proposals may be added to WASI Preview 2 at any time until WASI Preview 3 is launched. +## Witx and Wit + +Witx files can be derived from Wit files according to the Canonical ABI. Wasm +engines can implement single-module components using just these derived Witx files +and their existing Witx machinery. + ## Looking forward to Preview 3 Preview 3 will add the new `stream` and `future` keywords. The