@@ -6,7 +6,7 @@ The `wasm32-unknown-unknown` target is a WebAssembly compilation target which
6
6
does not import any functions from the host for the standard library. This is
7
7
the "minimal" WebAssembly in the sense of making the fewest assumptions about
8
8
the host environment. This target is often used when compiling to the web or
9
- JavaScript environments as there is not standard for what functions can be
9
+ JavaScript environments as there is no standard for what functions can be
10
10
imported on the web. This target can also be useful for creating minimal or
11
11
bare-bones WebAssembly binaries.
12
12
@@ -86,13 +86,13 @@ $ file foo.wasm
86
86
87
87
## Cross-compilation
88
88
89
- This target can be cross-compiled from any hosts .
89
+ This target can be cross-compiled from any host .
90
90
91
91
## Testing
92
92
93
93
This target is not tested in CI for the rust-lang/rust repository. Many tests
94
94
must be disabled to run on this target and failures are non-obvious because
95
- println doesn't work in the standard library. It's recommended to test the
95
+ ` println! ` doesn't work in the standard library. It's recommended to test the
96
96
` wasm32-wasip1 ` target instead for WebAssembly compatibility.
97
97
98
98
## Conditionally compiling code
@@ -118,7 +118,7 @@ Changes to WebAssembly go through a [proposals process][proposals] but reaching
118
118
the final stage (stage 5) does not automatically mean that the feature will be
119
119
enabled in LLVM and Rust by default. At this time the general guidance is that
120
120
features must be present in most engines for a "good chunk of time" before
121
- they're enabled in LLVM by default. There is currently not exact number of
121
+ they're enabled in LLVM by default. There is currently no exact number of
122
122
months or engines that are required to enable features by default.
123
123
124
124
[ proposals ] : https://github.com/WebAssembly/proposals
@@ -144,11 +144,14 @@ will produce a binary that uses only the original WebAssembly features by
144
144
default and no proposals since its inception.
145
145
146
146
To enable individual features it can be done with ` -Ctarget-feature=+foo ` .
147
- Available features can be found through:
147
+ Available features for Rust code itself are documented in the [ reference] and
148
+ can also be found through:
148
149
149
150
``` sh
150
151
$ rustc -Ctarget-feature=help --target wasm32-unknown-unknown
151
152
```
152
153
153
154
You'll need to consult your WebAssembly engine's documentation to learn more
154
155
about the supported WebAssembly features the engine has.
156
+
157
+ [ reference ] : https://doc.rust-lang.org/reference/attributes/codegen.html#wasm32-or-wasm64
0 commit comments