From 4ee130a28d1652fae4688a7dc1201ff02af25037 Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 14:58:06 +0100 Subject: [PATCH 1/6] Move all root docs files to doc/ Not including the README --- README.md | 4 ++-- Charter.md => docs/Charter.md | 0 Contributing.md => docs/Contributing.md | 0 Proposals.md => docs/Proposals.md | 4 ++-- proposals/README.md | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) rename Charter.md => docs/Charter.md (100%) rename Contributing.md => docs/Contributing.md (100%) rename Proposals.md => docs/Proposals.md (98%) diff --git a/README.md b/README.md index 465cfa234..793704ae4 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ virtualizability, and more. ## Find the APIs Development of each API happens in its own repo, which you can access -from the [proposals list](Proposals.md). +from the [proposals list](docs/Proposals.md). This repo is for general discussion, as well as documenting how we work and high-level goals. @@ -33,7 +33,7 @@ and high-level goals. ## Propose a new API If you would like to create a new proposal, get started with our -[Contributing guide](Contributing.md). +[Contributing guide](docs/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). diff --git a/Charter.md b/docs/Charter.md similarity index 100% rename from Charter.md rename to docs/Charter.md diff --git a/Contributing.md b/docs/Contributing.md similarity index 100% rename from Contributing.md rename to docs/Contributing.md diff --git a/Proposals.md b/docs/Proposals.md similarity index 98% rename from Proposals.md rename to docs/Proposals.md index 8dc0c9cd2..ce169dc5b 100644 --- a/Proposals.md +++ b/docs/Proposals.md @@ -4,8 +4,8 @@ WASI APIs are developed as proposals. These proposals go through 5 phases of dev You can learn more about contributing new proposals (and other ways to contribute) in our [Contributing] guide. -[the WASI Subgroup's Phase Process]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md#the-phase-process -[Contributing]: https://github.com/WebAssembly/WASI/blob/main/Contributing.md +[the WASI Subgroup's Phase Process]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md#the-phase-process +[Contributing]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md ## Active Proposals diff --git a/proposals/README.md b/proposals/README.md index 7f5c2352f..6a86acab6 100644 --- a/proposals/README.md +++ b/proposals/README.md @@ -89,7 +89,7 @@ Preview 2 in terms of Preview 3. 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 +[WASI Subgroup Phase Process]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md#the-phase-process +[portability criteria]: https://github.com/WebAssembly/WASI/blob/main/docs/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 4e98922936f621217ac8f9e3bfe666db624640a3 Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 15:00:37 +0100 Subject: [PATCH 2/6] Move the WASIp2 README to docs/Preview2 I move this from `wasip2/` to `proposals/` yesterday, and on second thought I feel like it would fit better under `docs/`. --- proposals/README.md => docs/Preview2.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename proposals/README.md => docs/Preview2.md (100%) diff --git a/proposals/README.md b/docs/Preview2.md similarity index 100% rename from proposals/README.md rename to docs/Preview2.md From 7c99b3cbe0512d2bec893c340260f8196fe29da2 Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 15:14:25 +0100 Subject: [PATCH 3/6] Move design principles from readme into docs/ --- README.md | 79 ---------------------------------------- docs/DesignPrinciples.md | 78 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 79 deletions(-) create mode 100644 docs/DesignPrinciples.md diff --git a/README.md b/README.md index 793704ae4..2bf7926e6 100644 --- a/README.md +++ b/README.md @@ -63,82 +63,3 @@ See the [Wit in WASI](docs/WitInWasi.md) document for more information about usi using libraries on top of new API modules to provide compatibility. [Capability-based]: https://en.wikipedia.org/wiki/Capability-based_security - -## WASI Design Principles - -### Capability-based security - -WASI is designed with capability-based security principles, using the -facilities provided by the Wasm [component model]. All access to external -resources is provided by capabilities. - -There are two kinds of capabilities: - - - Handles, defined in the [component-model type system], dynamically - identify and provide access to resources. They are unforgeable, meaning - there's no way for an instance to acquire access to a handle other than - to have another instance explicitly pass one to it. - - - Link-time capabilities, which are functions which require no handle - arguments, are used sparingly, in situations where it's not necessary - to identify more than one instance of a resource at runtime. Link-time - capabilities are *interposable*, so they are still refusable in a - capability-based security sense. - -WASI has no *ambient authorities*, meaning that there are no global -namespaces at runtime, and no global functions at link time. - -[component model]: https://github.com/WebAssembly/component-model -[component-model type system]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#type-definitions - -Note that this is a different sense of "capability" than [Linux -capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html) -or the withdrawn [POSIX -capabilities](https://archive.org/details/posix_1003.1e-990310), which -are per-process rather than per-resource. - -### Interposition - -Interposition in the context of WASI interfaces is the ability for a -Webassembly instance to implement a given WASI interface, and for a -consumer WebAssembly instance to be able to use this implementation -transparently. This can be used to adapt or attenuate the functionality -of a WASI API without changing the code using it. - -Component model interfaces always support link-time interposition. While -WASI APIs are often implemented in hosts, they can also be implemented -in Wasm, which may itself be a wrapper around the host. This may be used -to implement *attenuation*, providing filtered access to the underlying -host-provided functionality. - -Interposition is sometimes referred to as "virtualization", however we -use "interposition" here because the word "virtualization" has several -related meanings. - -### Compatibility - -Compatibility with existing applications and libraries, as well as -existing host platforms, is important, but will sometimes be in conflict -with overall API cleanliness, safety, performance, or portability. -Where practical, WASI seeks to keep the WASI API itself free of -compatibility concerns, and provides compatibility through libraries, -such as WASI libc, and tools. This way, applications which don't require -compatibility for compatibility's sake aren't burdened by it. - -### Portability - -Portability is important to WASI, however the meaning of portability -will be specific to each API. - -WASI's modular nature means that engines don't need to implement every -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/docs/DesignPrinciples.md b/docs/DesignPrinciples.md new file mode 100644 index 000000000..a17deed09 --- /dev/null +++ b/docs/DesignPrinciples.md @@ -0,0 +1,78 @@ +## WASI Design Principles + +### Capability-based security + +WASI is designed with capability-based security principles, using the +facilities provided by the Wasm [component model]. All access to external +resources is provided by capabilities. + +There are two kinds of capabilities: + + - Handles, defined in the [component-model type system], dynamically + identify and provide access to resources. They are unforgeable, meaning + there's no way for an instance to acquire access to a handle other than + to have another instance explicitly pass one to it. + + - Link-time capabilities, which are functions which require no handle + arguments, are used sparingly, in situations where it's not necessary + to identify more than one instance of a resource at runtime. Link-time + capabilities are *interposable*, so they are still refusable in a + capability-based security sense. + +WASI has no *ambient authorities*, meaning that there are no global +namespaces at runtime, and no global functions at link time. + +[component model]: https://github.com/WebAssembly/component-model +[component-model type system]: https://github.com/WebAssembly/component-model/blob/main/design/mvp/Explainer.md#type-definitions + +Note that this is a different sense of "capability" than [Linux +capabilities](http://man7.org/linux/man-pages/man7/capabilities.7.html) +or the withdrawn [POSIX +capabilities](https://archive.org/details/posix_1003.1e-990310), which +are per-process rather than per-resource. + +### Interposition + +Interposition in the context of WASI interfaces is the ability for a +Webassembly instance to implement a given WASI interface, and for a +consumer WebAssembly instance to be able to use this implementation +transparently. This can be used to adapt or attenuate the functionality +of a WASI API without changing the code using it. + +Component model interfaces always support link-time interposition. While +WASI APIs are often implemented in hosts, they can also be implemented +in Wasm, which may itself be a wrapper around the host. This may be used +to implement *attenuation*, providing filtered access to the underlying +host-provided functionality. + +Interposition is sometimes referred to as "virtualization", however we +use "interposition" here because the word "virtualization" has several +related meanings. + +### Compatibility + +Compatibility with existing applications and libraries, as well as +existing host platforms, is important, but will sometimes be in conflict +with overall API cleanliness, safety, performance, or portability. +Where practical, WASI seeks to keep the WASI API itself free of +compatibility concerns, and provides compatibility through libraries, +such as WASI libc, and tools. This way, applications which don't require +compatibility for compatibility's sake aren't burdened by it. + +### Portability + +Portability is important to WASI, however the meaning of portability +will be specific to each API. + +WASI's modular nature means that engines don't need to implement every +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. From 0934646ef1670701118efd4068263b63c79786a5 Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 15:15:18 +0100 Subject: [PATCH 4/6] Move high level goals from README to docs/ --- README.md | 25 ------------------------- docs/HighLevelGoals.md | 24 ++++++++++++++++++++++++ 2 files changed, 24 insertions(+), 25 deletions(-) create mode 100644 docs/HighLevelGoals.md diff --git a/README.md b/README.md index 2bf7926e6..2a63ecefc 100644 --- a/README.md +++ b/README.md @@ -38,28 +38,3 @@ If you would like to create a new proposal, get started with our 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).) - -1. Define a set of portable, modular, runtime-independent, and - WebAssembly-native APIs which can be used by WebAssembly code to interact - with the outside world. These APIs preserve the essential sandboxed nature of - WebAssembly through a [Capability-based] API design. -2. Specify and implement incrementally. Start with a Minimum Viable Product - (MVP), then adding additional features, prioritized by feedback and - experience. -3. Supplement API designs with documentation and tests, and, when feasible, - reference implementations which can be shared between wasm engines. -4. Make a great platform: - * Work with WebAssembly tool and library authors to help them provide - WASI support for their users. - * When being WebAssembly-native means the platform isn't directly - compatible with existing applications written for other platforms, - design to enable compatibility to be provided by tools and libraries. - * Allow the overall API to evolve over time; to make changes to API - modules that have been standardized, build implementations of them - using libraries on top of new API modules to provide compatibility. - -[Capability-based]: https://en.wikipedia.org/wiki/Capability-based_security diff --git a/docs/HighLevelGoals.md b/docs/HighLevelGoals.md new file mode 100644 index 000000000..8788f7576 --- /dev/null +++ b/docs/HighLevelGoals.md @@ -0,0 +1,24 @@ +## WASI High Level Goals + +(In the spirit of [WebAssembly's High-Level Goals](https://github.com/WebAssembly/design/blob/main/HighLevelGoals.md).) + +1. Define a set of portable, modular, runtime-independent, and + WebAssembly-native APIs which can be used by WebAssembly code to interact + with the outside world. These APIs preserve the essential sandboxed nature of + WebAssembly through a [Capability-based] API design. +2. Specify and implement incrementally. Start with a Minimum Viable Product + (MVP), then adding additional features, prioritized by feedback and + experience. +3. Supplement API designs with documentation and tests, and, when feasible, + reference implementations which can be shared between wasm engines. +4. Make a great platform: + * Work with WebAssembly tool and library authors to help them provide + WASI support for their users. + * When being WebAssembly-native means the platform isn't directly + compatible with existing applications written for other platforms, + design to enable compatibility to be provided by tools and libraries. + * Allow the overall API to evolve over time; to make changes to API + modules that have been standardized, build implementations of them + using libraries on top of new API modules to provide compatibility. + +[Capability-based]: https://en.wikipedia.org/wiki/Capability-based_security From 5f2094636cb58dac1316c96f17fb1539b7a8c447 Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 15:29:44 +0100 Subject: [PATCH 5/6] Update all Proposals.md links --- docs/Contributing.md | 6 +++--- proposals/cli/README.md | 2 +- proposals/clocks/README.md | 2 +- proposals/filesystem/README.md | 2 +- proposals/http/README.md | 2 +- proposals/io/README.md | 2 +- proposals/random/README.md | 2 +- proposals/sockets/README.md | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/Contributing.md b/docs/Contributing.md index 82672f347..3d6f8916f 100644 --- a/docs/Contributing.md +++ b/docs/Contributing.md @@ -7,7 +7,7 @@ Interested in participating? Please follow Also, please be sure to read [the README.md](README.md) for this repository. -To contribute to an [existing proposal](https://github.com/WebAssembly/WASI/blob/main/Proposals.md), +To contribute to an [existing proposal](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md), refer to the linked proposal repository. The start a new proposal, the first step is to file an issue in the @@ -46,7 +46,7 @@ During this phase: 1. An issue is filed on the [WASI repository](https://github.com/WebAssembly/WASI/issues) to present the idea. 1. Discussion on the API occurs on the issue. - 1. A champion or champions emerge. They may add the proposal to the [proposal list](https://github.com/WebAssembly/WASI/blob/main/Proposals.md) at phase 0. + 1. A champion or champions emerge. They may add the proposal to the [proposal list](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md) at phase 0. 1. The champion(s) put together a description of the API in their own GitHub repository or on the issue. You can use the [proposal template] if you like, but it's not required in this phase. ### 1. Feature Proposal [WASI Subgroup] @@ -58,7 +58,7 @@ Entry requirements: During this phase: - 1. If the proposal is not already listed, it should be added to the [proposal list](https://github.com/WebAssembly/WASI/blob/main/Proposals.md) at this time. + 1. If the proposal is not already listed, it should be added to the [proposal list](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md) at this time. 1. A new repository, forking the [proposal template] repo, is created by one of the SG chairs, or transferred to the WebAssembly organization by the champion. 1. The champion will attempt to reach broad consensus in the Subgroup. 1. Pull requests and issues are used to iterate on the design of the API. Specifically, an overview document must be produced that specifies the API with reasonably precise and complete language before attempting to move to phase 2 (meaning it is sufficiently precise to be implemented following this description, without obvious holes or ambiguities). diff --git a/proposals/cli/README.md b/proposals/cli/README.md index 7df15996a..90b388004 100644 --- a/proposals/cli/README.md +++ b/proposals/cli/README.md @@ -6,7 +6,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A wasi-cli is currently in [Phase 3]. -[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg +[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg ### Champions diff --git a/proposals/clocks/README.md b/proposals/clocks/README.md index a99080fae..b7d0c3ef7 100644 --- a/proposals/clocks/README.md +++ b/proposals/clocks/README.md @@ -6,7 +6,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A WASI-clocks is currently in [Phase 3]. -[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg +[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg ### Champions diff --git a/proposals/filesystem/README.md b/proposals/filesystem/README.md index b71eab4ee..06c90fc6f 100644 --- a/proposals/filesystem/README.md +++ b/proposals/filesystem/README.md @@ -6,7 +6,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A WASI-filesystem is currently in [Phase 3]. -[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg +[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg ### Champions diff --git a/proposals/http/README.md b/proposals/http/README.md index bfe0572a4..5ed5e7f24 100644 --- a/proposals/http/README.md +++ b/proposals/http/README.md @@ -4,7 +4,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A ### Current Phase -wasi-http is currently in [Phase 3](https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg) +wasi-http is currently in [Phase 3](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg) ### Champions diff --git a/proposals/io/README.md b/proposals/io/README.md index 9efd0bcaf..e8143232b 100644 --- a/proposals/io/README.md +++ b/proposals/io/README.md @@ -6,7 +6,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A WASI I/O is currently in [Phase 3]. -[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg +[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg ### Champions diff --git a/proposals/random/README.md b/proposals/random/README.md index f68b5ace6..d13e67256 100644 --- a/proposals/random/README.md +++ b/proposals/random/README.md @@ -6,7 +6,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A WASI-random is currently in [Phase 3]. -[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg +[Phase 3]: https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg ### Champions diff --git a/proposals/sockets/README.md b/proposals/sockets/README.md index bc2f088b9..afb0ce883 100644 --- a/proposals/sockets/README.md +++ b/proposals/sockets/README.md @@ -4,7 +4,7 @@ A proposed [WebAssembly System Interface](https://github.com/WebAssembly/WASI) A ### Current Phase -[Phase 3](https://github.com/WebAssembly/WASI/blob/main/Proposals.md#phase-3---implementation-phase-cg--wg) +[Phase 3](https://github.com/WebAssembly/WASI/blob/main/docs/Proposals.md#phase-3---implementation-phase-cg--wg) ### Champions From 1b7622ca71936a3e3c4ce6f50384a1db7bc70c0f Mon Sep 17 00:00:00 2001 From: Yosh Date: Wed, 26 Nov 2025 16:48:13 +0100 Subject: [PATCH 6/6] move CONTRIBUTING.md to root --- docs/Contributing.md => CONTRIBUTING.md | 0 README.md | 2 +- docs/Preview2.md | 4 ++-- docs/Proposals.md | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename docs/Contributing.md => CONTRIBUTING.md (100%) diff --git a/docs/Contributing.md b/CONTRIBUTING.md similarity index 100% rename from docs/Contributing.md rename to CONTRIBUTING.md diff --git a/README.md b/README.md index 2a63ecefc..f8f9a7f2a 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ and high-level goals. ## Propose a new API If you would like to create a new proposal, get started with our -[Contributing guide](docs/Contributing.md). +[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). diff --git a/docs/Preview2.md b/docs/Preview2.md index 6a86acab6..3ff1b003b 100644 --- a/docs/Preview2.md +++ b/docs/Preview2.md @@ -89,7 +89,7 @@ Preview 2 in terms of Preview 3. 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/docs/Contributing.md#the-phase-process -[portability criteria]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md#2-feature-description-available-wasi-subgroup +[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 [launch criteria]: #wasi-preview-2-launch-criteria diff --git a/docs/Proposals.md b/docs/Proposals.md index ce169dc5b..ff5541bb2 100644 --- a/docs/Proposals.md +++ b/docs/Proposals.md @@ -4,8 +4,8 @@ WASI APIs are developed as proposals. These proposals go through 5 phases of dev You can learn more about contributing new proposals (and other ways to contribute) in our [Contributing] guide. -[the WASI Subgroup's Phase Process]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md#the-phase-process -[Contributing]: https://github.com/WebAssembly/WASI/blob/main/docs/Contributing.md +[the WASI Subgroup's Phase Process]: https://github.com/WebAssembly/WASI/blob/main/CONTRIBUTING.md#the-phase-process +[Contributing]: https://github.com/WebAssembly/WASI/blob/main/CONTRIBUTING.md ## Active Proposals