26
26
//! | Web Browser and Node.js | `wasm*‑*‑unknown` | [`Crypto.getRandomValues`] if available, then [`crypto.randomFillSync`] if on Node.js, see [WebAssembly support]
27
27
//! | SOLID | `*-kmc-solid_*` | `SOLID_RNG_SampleRandomBytes`
28
28
//! | Nintendo 3DS | `armv6k-nintendo-3ds` | [`getrandom`][1]
29
- //! | PS Vita | `armv7-sony- vita-newlibeabihf` | [`getentropy`][13]
30
- //! | QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
29
+ //! | PS Vita | `*- vita-*` | [`getentropy`][13]
30
+ //! | QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
31
31
//! | AIX | `*-ibm-aix` | [`/dev/urandom`][15]
32
32
//!
33
33
//! There is no blanket implementation on `unix` targets that reads from
@@ -237,6 +237,14 @@ cfg_if! {
237
237
if #[ cfg( any( target_os = "haiku" , target_os = "redox" , target_os = "nto" , target_os = "aix" ) ) ] {
238
238
mod util_libc;
239
239
#[ path = "use_file.rs" ] mod imp;
240
+ } else if #[ cfg( any(
241
+ target_os = "macos" ,
242
+ target_os = "openbsd" ,
243
+ target_os = "vita" ,
244
+ target_os = "emscripten" ,
245
+ ) ) ] {
246
+ mod util_libc;
247
+ #[ path = "getentropy.rs" ] mod imp;
240
248
} else if #[ cfg( any(
241
249
target_os = "dragonfly" ,
242
250
target_os = "freebsd" ,
@@ -305,12 +313,6 @@ cfg_if! {
305
313
#[ path = "fuchsia.rs" ] mod imp;
306
314
} else if #[ cfg( any( target_os = "ios" , target_os = "visionos" , target_os = "watchos" , target_os = "tvos" ) ) ] {
307
315
#[ path = "apple-other.rs" ] mod imp;
308
- } else if #[ cfg( target_os = "macos" ) ] {
309
- mod util_libc;
310
- #[ path = "macos.rs" ] mod imp;
311
- } else if #[ cfg( target_os = "openbsd" ) ] {
312
- mod util_libc;
313
- #[ path = "openbsd.rs" ] mod imp;
314
316
} else if #[ cfg( all( target_arch = "wasm32" , target_os = "wasi" ) ) ] {
315
317
#[ path = "wasi.rs" ] mod imp;
316
318
} else if #[ cfg( target_os = "hermit" ) ] {
@@ -324,12 +326,6 @@ cfg_if! {
324
326
#[ path = "espidf.rs" ] mod imp;
325
327
} else if #[ cfg( windows) ] {
326
328
#[ path = "windows.rs" ] mod imp;
327
- } else if #[ cfg( target_os = "vita" ) ] {
328
- mod util_libc;
329
- #[ path = "vita.rs" ] mod imp;
330
- } else if #[ cfg( target_os = "emscripten" ) ] {
331
- mod util_libc;
332
- #[ path = "emscripten.rs" ] mod imp;
333
329
} else if #[ cfg( all( target_arch = "x86_64" , target_env = "sgx" ) ) ] {
334
330
mod lazy;
335
331
#[ path = "rdrand.rs" ] mod imp;
0 commit comments