Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit dea3846

Browse files
committed
Review comments
1 parent e65a48e commit dea3846

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The `wasm32-unknown-unknown` target is a WebAssembly compilation target which
66
does not import any functions from the host for the standard library. This is
77
the "minimal" WebAssembly in the sense of making the fewest assumptions about
88
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
1010
imported on the web. This target can also be useful for creating minimal or
1111
bare-bones WebAssembly binaries.
1212

@@ -86,13 +86,13 @@ $ file foo.wasm
8686

8787
## Cross-compilation
8888

89-
This target can be cross-compiled from any hosts.
89+
This target can be cross-compiled from any host.
9090

9191
## Testing
9292

9393
This target is not tested in CI for the rust-lang/rust repository. Many tests
9494
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
9696
`wasm32-wasip1` target instead for WebAssembly compatibility.
9797

9898
## Conditionally compiling code
@@ -118,7 +118,7 @@ Changes to WebAssembly go through a [proposals process][proposals] but reaching
118118
the final stage (stage 5) does not automatically mean that the feature will be
119119
enabled in LLVM and Rust by default. At this time the general guidance is that
120120
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
122122
months or engines that are required to enable features by default.
123123

124124
[proposals]: https://github.com/WebAssembly/proposals
@@ -144,11 +144,14 @@ will produce a binary that uses only the original WebAssembly features by
144144
default and no proposals since its inception.
145145

146146
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:
148149

149150
```sh
150151
$ rustc -Ctarget-feature=help --target wasm32-unknown-unknown
151152
```
152153

153154
You'll need to consult your WebAssembly engine's documentation to learn more
154155
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

Comments
 (0)