Skip to content

Commit 06197ef

Browse files
committed
Review comments
1 parent a5082ef commit 06197ef

File tree

4 files changed

+20
-8
lines changed

4 files changed

+20
-8
lines changed

src/doc/rustc/src/platform-support/wasm32-unknown-unknown.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ Rust standard library additionally must be recompiled.
141141
Compiling all code for the initial release of WebAssembly looks like:
142142

143143
```sh
144-
$ export RUSTFLAG=-Ctarget-cpu=mvp
144+
$ export RUSTFLAGS=-Ctarget-cpu=mvp
145145
$ cargo +nightly build -Zbuild-std=panic_abort,std --target wasm32-unknown-unknown
146146
```
147147

@@ -166,7 +166,7 @@ about the supported WebAssembly features the engine has.
166166

167167
Note that it is still possible for Rust crates and libraries to enable
168168
WebAssembly features on a per-function level. This means that the build
169-
command above may not be sufficent to disable all WebAssembly features. If the
169+
command above may not be sufficient to disable all WebAssembly features. If the
170170
final binary still has SIMD instructions, for example, the function in question
171171
will need to be found and the crate in question will likely contain something
172172
like:

src/doc/rustc/src/platform-support/wasm32-wasip1-threads.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,3 +162,17 @@ It's recommended to conditionally compile code for this target with:
162162
Prior to Rust 1.80 the `target_env = "p1"` key was not set. Currently the
163163
`target_feature = "atomics"` is Nightly-only. Note that the precise `#[cfg]`
164164
necessary to detect this target may change as the target becomes more stable.
165+
166+
## Enabled WebAssembly features
167+
168+
The default set of WebAssembly features enabled for compilation is similar to
169+
[`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md) but two more features
170+
are included:
171+
172+
* `bulk-memory`
173+
* `atomics`
174+
175+
For more information about features see the documentation for
176+
[`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md), but note that the
177+
`mvp` CPU in LLVM does not support this target as it's required that
178+
`bulk-memory`, `atomics`, and `mutable-globals` are all enabled.

src/doc/rustc/src/platform-support/wasm32-wasip1.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,5 @@ to Rust 1.80 the `target_env` condition was not set.
136136
## Enabled WebAssembly features
137137

138138
The default set of WebAssembly features enabled for compilation is currently the
139-
same across all WebAssembly targets. For more information on WebAssembly
140-
features see the documentation for
141-
[`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md)
139+
same as [`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md). See the
140+
documentation there for more information.

src/doc/rustc/src/platform-support/wasm32-wasip2.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,5 @@ It's recommended to conditionally compile code for this target with:
6565
## Enabled WebAssembly features
6666

6767
The default set of WebAssembly features enabled for compilation is currently the
68-
same across all WebAssembly targets. For more information on WebAssembly
69-
features see the documentation for
70-
[`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md)
68+
same as [`wasm32-unknown-unknokwn`](./wasm32-unknown-unknown.md). See the
69+
documentation there for more information.

0 commit comments

Comments
 (0)