|
30 | 30 | //! | ESP-IDF | `*‑espidf` | [`esp_fill_random`] |
31 | 31 | //! | Emscripten | `*‑emscripten` | `/dev/urandom` (identical to `/dev/random`) |
32 | 32 | //! | WASI | `wasm32‑wasi` | [`random_get`] |
33 | | -//! | Web Browser and Node.js | `wasm32‑*‑unknown` | [`Crypto.getRandomValues`] if available, then [`crypto.randomFillSync`] if on Node.js, see [WebAssembly support] |
| 33 | +//! | Web Browser and Node.js | `wasm*‑*‑unknown` | [`Crypto.getRandomValues`] if available, then [`crypto.randomFillSync`] if on Node.js, see [WebAssembly support] |
34 | 34 | //! | SOLID | `*-kmc-solid_*` | `SOLID_RNG_SampleRandomBytes` |
35 | 35 | //! | Nintendo 3DS | `armv6k-nintendo-3ds` | [`getrandom`][1] |
36 | 36 | //! |
@@ -262,12 +262,14 @@ cfg_if! { |
262 | 262 | any(target_arch = "x86_64", target_arch = "x86")))] { |
263 | 263 | #[path = "rdrand.rs"] mod imp; |
264 | 264 | } else if #[cfg(all(feature = "js", |
265 | | - target_arch = "wasm32", target_os = "unknown"))] { |
| 265 | + any(target_arch = "wasm32", target_arch = "wasm64"), |
| 266 | + target_os = "unknown"))] { |
266 | 267 | #[path = "js.rs"] mod imp; |
267 | 268 | } else if #[cfg(feature = "custom")] { |
268 | 269 | use custom as imp; |
269 | | - } else if #[cfg(all(target_arch = "wasm32", target_os = "unknown"))] { |
270 | | - compile_error!("the wasm32-unknown-unknown target is not supported by \ |
| 270 | + } else if #[cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), |
| 271 | + target_os = "unknown"))] { |
| 272 | + compile_error!("the wasm*-unknown-unknown targets are not supported by \ |
271 | 273 | default, you may need to enable the \"js\" feature. \ |
272 | 274 | For more information see: \ |
273 | 275 | https://docs.rs/getrandom/#webassembly-support"); |
|
0 commit comments