Skip to content

Commit

Permalink
Merge pull request #1132 from rust-random/readme-wasm-note
Browse files Browse the repository at this point in the history
README: add note regarding wasm32-unknown-unknown
  • Loading branch information
dhardy committed May 31, 2021
2 parents 2732f2d + d9c6a76 commit 66b1636
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions README.md
Expand Up @@ -139,6 +139,14 @@ unavailable (unless `getrandom` is enabled), large parts of `seq` are
unavailable (unless `alloc` is enabled), and `thread_rng` and `random` are
unavailable.

### WASM support

The WASM target `wasm32-unknown-unknown` is not *automatically* supported by
`rand` or `getrandom`. To solve this, either use a different target such as
`wasm32-wasi` or add a direct dependancy on `getrandom` with the `js` feature
(if the target supports JavaScript). See
[getrandom#WebAssembly support](https://docs.rs/getrandom/latest/getrandom/#webassembly-support).

# License

Rand is distributed under the terms of both the MIT license and the
Expand Down

0 comments on commit 66b1636

Please sign in to comment.