File tree Expand file tree Collapse file tree 4 files changed +20
-8
lines changed
src/doc/rustc/src/platform-support Expand file tree Collapse file tree 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.
141141Compiling 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
167167Note that it is still possible for Rust crates and libraries to enable
168168WebAssembly 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
170170final binary still has SIMD instructions, for example, the function in question
171171will need to be found and the crate in question will likely contain something
172172like:
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:
162162Prior 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] `
164164necessary 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.
136136## Enabled WebAssembly features
137137
138138The 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:
6565## Enabled WebAssembly features
6666
6767The 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