about summary refs log tree commit diff
path: root/src/doc
diff options
context:
space:
mode:
authorRyan Levick <me@ryanlevick.com>2023-12-18 21:43:02 +0100
committerRyan Levick <me@ryanlevick.com>2024-01-23 13:26:16 +0100
commit31ecf341250a889ac1154b2cbe3f0b97f9d008c1 (patch)
treed0adab221e959b34b937c584f1922730eec7b286 /src/doc
parent8b94152af68a0ed6d6af0b5ba57491e40481008e (diff)
Add the wasm32-wasi-preview2 target
Signed-off-by: Ryan Levick <me@ryanlevick.com>
Diffstat (limited to 'src/doc')
-rw-r--r--src/doc/rustc/src/SUMMARY.md1
-rw-r--r--src/doc/rustc/src/platform-support.md1
-rw-r--r--src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md30
3 files changed, 32 insertions, 0 deletions
diff --git a/src/doc/rustc/src/SUMMARY.md b/src/doc/rustc/src/SUMMARY.md
index 1998b008dc8..990998ea704 100644
--- a/src/doc/rustc/src/SUMMARY.md
+++ b/src/doc/rustc/src/SUMMARY.md
@@ -59,6 +59,7 @@
     - [*-unknown-openbsd](platform-support/openbsd.md)
     - [\*-unknown-uefi](platform-support/unknown-uefi.md)
     - [wasm32-wasi-preview1-threads](platform-support/wasm32-wasi-preview1-threads.md)
+    - [wasm32-wasi-preview2](platform-support/wasm32-wasi-preview2.md)
     - [wasm64-unknown-unknown](platform-support/wasm64-unknown-unknown.md)
     - [\*-win7-windows-msvc](platform-support/win7-windows-msvc.md)
     - [x86_64-fortanix-unknown-sgx](platform-support/x86_64-fortanix-unknown-sgx.md)
diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md
index f648a60b6c4..fb751b7229e 100644
--- a/src/doc/rustc/src/platform-support.md
+++ b/src/doc/rustc/src/platform-support.md
@@ -360,6 +360,7 @@ target | std | host | notes
 `thumbv7a-pc-windows-msvc` | ? |  |
 `thumbv7a-uwp-windows-msvc` | ✓ |  |
 `thumbv7neon-unknown-linux-musleabihf` | ? |  | Thumb2-mode ARMv7-A Linux with NEON, MUSL
+[`wasm32-wasi-preview2`](platform-support/wasm32-wasi-preview2.md) | ✓ |  | WebAssembly
 [`wasm64-unknown-unknown`](platform-support/wasm64-unknown-unknown.md) | ? |  | WebAssembly
 `x86_64-apple-ios-macabi` | ✓ |  | Apple Catalyst on x86_64
 [`x86_64-apple-tvos`](platform-support/apple-tvos.md) | ? |  | x86 64-bit tvOS
diff --git a/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md b/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md
new file mode 100644
index 00000000000..837efd13d41
--- /dev/null
+++ b/src/doc/rustc/src/platform-support/wasm32-wasi-preview2.md
@@ -0,0 +1,30 @@
+# `wasm32-wasi-preview2`
+
+**Tier: 3**
+
+The `wasm32-wasi-preview2` target is a new and still (as of January 2024) an
+experimental target. This target is an extension to `wasm32-wasi-preview1` target,
+originally known as `wasm32-wasi`. It is the next evolution in the development of
+wasi (the [WebAssembly System Interface](https://wasi.dev)) that uses the WebAssembly
+[component model] to allow for a standardized set of syscalls that are intended to empower
+WebAssembly binaries with native host capabilities.
+
+[component model]: https://github.com/WebAssembly/component-model
+
+## Target maintainers
+
+- Alex Crichton, https://github.com/alexcrichton
+- Ryan Levick, https://github.com/rylev
+
+## Requirements
+
+This target is cross-compiled. The target supports `std` fully.
+
+## Platform requirements
+
+The WebAssembly runtime should support the wasi preview 2 API set.
+
+This target is not a stable target. This means that there are only a few engines
+which implement wasi preview 2, for example:
+
+* Wasmtime - `-W component-model`