File tree 4 files changed +20
-8
lines changed
src/doc/rustc/src/platform-support
4 files changed +20
-8
lines changed Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ Rust standard library additionally must be recompiled.
141
141
Compiling all code for the initial release of WebAssembly looks like:
142
142
143
143
``` sh
144
- $ export RUSTFLAG =-Ctarget-cpu=mvp
144
+ $ export RUSTFLAGS =-Ctarget-cpu=mvp
145
145
$ cargo +nightly build -Zbuild-std=panic_abort,std --target wasm32-unknown-unknown
146
146
```
147
147
@@ -166,7 +166,7 @@ about the supported WebAssembly features the engine has.
166
166
167
167
Note that it is still possible for Rust crates and libraries to enable
168
168
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
170
170
final binary still has SIMD instructions, for example, the function in question
171
171
will need to be found and the crate in question will likely contain something
172
172
like:
Original file line number Diff line number Diff line change @@ -162,3 +162,17 @@ It's recommended to conditionally compile code for this target with:
162
162
Prior to Rust 1.80 the ` target_env = "p1" ` key was not set. Currently the
163
163
` target_feature = "atomics" ` is Nightly-only. Note that the precise ` #[cfg] `
164
164
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.
Original file line number Diff line number Diff line change @@ -136,6 +136,5 @@ to Rust 1.80 the `target_env` condition was not set.
136
136
## Enabled WebAssembly features
137
137
138
138
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.
Original file line number Diff line number Diff line change @@ -65,6 +65,5 @@ It's recommended to conditionally compile code for this target with:
65
65
## Enabled WebAssembly features
66
66
67
67
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.
You can’t perform that action at this time.
0 commit comments