|
10 | 10 | //!
|
11 | 11 | //! # Supported targets
|
12 | 12 | //!
|
13 |
| -//! | Target | Implementation |
14 |
| -//! |------------------|--------------------------------------------------------- |
15 |
| -//! | Linux, Android | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random` |
16 |
| -//! | Windows | [`RtlGenRandom`][3] |
17 |
| -//! | [Windows UWP][22]| [`BCryptGenRandom`][23] |
18 |
| -//! | macOS | [`getentropy()`][19] if available, otherwise [`/dev/random`][20] (identical to `/dev/urandom`) |
19 |
| -//! | iOS | [`SecRandomCopyBytes`][4] |
20 |
| -//! | FreeBSD | [`getrandom()`][21] if available, otherwise [`kern.arandom`][5] |
21 |
| -//! | OpenBSD | [`getentropy`][6] |
22 |
| -//! | NetBSD | [`kern.arandom`][7] |
23 |
| -//! | Dragonfly BSD | [`/dev/random`][8] |
24 |
| -//! | Solaris, illumos | [`getrandom`][9] system call if available, otherwise [`/dev/random`][10] |
25 |
| -//! | Fuchsia OS | [`cprng_draw`][11] |
26 |
| -//! | Redox | [`rand:`][12] |
27 |
| -//! | CloudABI | [`cloudabi_sys_random_get`][13] |
28 |
| -//! | Haiku | `/dev/random` (identical to `/dev/urandom`) |
29 |
| -//! | SGX | [RDRAND][18] |
30 |
| -//! | VxWorks | `randABytes` after checking entropy pool initialization with `randSecure` |
31 |
| -//! | Emscripten | `/dev/random` (identical to `/dev/urandom`) |
32 |
| -//! | WASI | [`__wasi_random_get`][17] |
33 |
| -//! | Web Browser | [`Crypto.getRandomValues()`][14], see [WebAssembly support][16] |
34 |
| -//! | Node.js | [`crypto.randomBytes`][15], see [WebAssembly support][16] |
| 13 | +//! | Target | Target Triple | Implementation |
| 14 | +//! | ----------------- | ------------------ | -------------- |
| 15 | +//! | Linux, Android | `*‑linux‑*` | [`getrandom`][1] system call if available, otherwise [`/dev/urandom`][2] after successfully polling `/dev/random` | |
| 16 | +//! | Windows | `*‑pc‑windows‑*` | [`RtlGenRandom`][3] | |
| 17 | +//! | [Windows UWP][22] | `*‑uwp‑windows‑*` | [`BCryptGenRandom`][23] | |
| 18 | +//! | macOS | `*‑apple‑darwin` | [`getentropy()`][19] if available, otherwise [`/dev/random`][20] (identical to `/dev/urandom`) |
| 19 | +//! | iOS | `*‑apple‑ios` | [`SecRandomCopyBytes`][4] |
| 20 | +//! | FreeBSD | `*‑freebsd` | [`getrandom()`][21] if available, otherwise [`kern.arandom`][5] |
| 21 | +//! | OpenBSD | `*‑openbsd` | [`getentropy`][6] |
| 22 | +//! | NetBSD | `*‑netbsd` | [`kern.arandom`][7] |
| 23 | +//! | Dragonfly BSD | `*‑dragonfly` | [`/dev/random`][8] |
| 24 | +//! | Solaris, illumos | `*‑solaris`, `*‑illumos` | [`getrandom()`][9] if available, otherwise [`/dev/random`][10] |
| 25 | +//! | Fuchsia OS | `*‑fuchsia` | [`cprng_draw`][11] |
| 26 | +//! | Redox | `*‑cloudabi` | [`rand:`][12] |
| 27 | +//! | CloudABI | `*‑redox` | [`cloudabi_sys_random_get`][13] |
| 28 | +//! | Haiku | `*‑haiku` | `/dev/random` (identical to `/dev/urandom`) |
| 29 | +//! | SGX | `x86_64‑*‑sgx` | [RDRAND][18] |
| 30 | +//! | VxWorks | `*‑wrs‑vxworks‑*` | `randABytes` after checking entropy pool initialization with `randSecure` |
| 31 | +//! | Emscripten | `*‑emscripten` | `/dev/random` (identical to `/dev/urandom`) |
| 32 | +//! | WASI | `wasm32‑wasi` | [`__wasi_random_get`][17] |
| 33 | +//! | Web Browser | `wasm32‑*‑unknown` | [`Crypto.getRandomValues()`][14], see [WebAssembly support][16] |
| 34 | +//! | Node.js | `wasm32‑*‑unknown` | [`crypto.randomBytes`][15], see [WebAssembly support][16] |
35 | 35 | //!
|
36 | 36 | //! There is no blanket implementation on `unix` targets that reads from
|
37 | 37 | //! `/dev/urandom`. This ensures all supported targets are using the recommended
|
|
0 commit comments