1212//! | OpenBSD | `*‑openbsd` | [`getentropy`][7]
1313//! | NetBSD | `*‑netbsd` | [`getrandom`][16] if available, otherwise [`kern.arandom`][8]
1414//! | Dragonfly BSD | `*‑dragonfly` | [`getrandom`][9]
15- //! | Solaris, illumos | `*‑solaris`, `*‑illumos` | [`getrandom`][11] if available, otherwise [`/dev/random`][12]
15+ //! | Solaris | `*‑solaris` | [`getentropy`][11]
16+ //! | Illumos | `*‑illumos` | [`getrandom`][12]
1617//! | Fuchsia OS | `*‑fuchsia` | [`cprng_draw`]
1718//! | Redox | `*‑redox` | `/dev/urandom`
1819//! | Haiku | `*‑haiku` | `/dev/urandom` (identical to `/dev/random`)
2526//! | WASI | `wasm32‑wasi` | [`random_get`]
2627//! | Web Browser and Node.js | `wasm*‑*‑unknown` | [`Crypto.getRandomValues`] if available, then [`crypto.randomFillSync`] if on Node.js, see [WebAssembly support]
2728//! | SOLID | `*-kmc-solid_*` | `SOLID_RNG_SampleRandomBytes`
28- //! | Nintendo 3DS | `armv6k -nintendo-3ds` | [`getrandom`][1 ]
29+ //! | Nintendo 3DS | `* -nintendo-3ds` | [`getrandom`][18 ]
2930//! | PS Vita | `*-vita-*` | [`getentropy`][13]
3031//! | QNX Neutrino | `*‑nto-qnx*` | [`/dev/urandom`][14] (identical to `/dev/random`)
3132//! | AIX | `*-ibm-aix` | [`/dev/urandom`][15]
3233//!
33- //! There is no blanket implementation on `unix` targets that reads from
34- //! `/dev/urandom`. This ensures all supported targets are using the recommended
35- //! interface and respect maximum buffer sizes.
36- //!
3734//! Pull Requests that add support for new targets to `getrandom` are always welcome.
3835//!
3936//! ## Unsupported targets
176173//! [7]: https://man.openbsd.org/getentropy.2
177174//! [8]: https://man.netbsd.org/sysctl.7
178175//! [9]: https://leaf.dragonflybsd.org/cgi/web-man?command=getrandom
179- //! [11]: https://docs.oracle.com/cd/E88353_01/html/E37841/getrandom -2.html
180- //! [12]: https://docs.oracle.com/cd/E86824_01/html/E54777/random-7d.html
176+ //! [11]: https://docs.oracle.com/cd/E88353_01/html/E37841/getentropy -2.html
177+ //! [12]: https://illumos.org/man/2/getrandom
181178//! [13]: https://github.com/emscripten-core/emscripten/pull/12240
182179//! [14]: https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.utilities/topic/r/random.html
183180//! [15]: https://www.ibm.com/docs/en/aix/7.3?topic=files-random-urandom-devices
184181//! [16]: https://man.netbsd.org/getrandom.2
185182//! [17]: https://www.gnu.org/software/libc/manual/html_mono/libc.html#index-getrandom
183+ //! [18]: https://github.com/rust3ds/shim-3ds/commit/b01d2568836dea2a65d05d662f8e5f805c64389d
186184//!
187185//! [`BCryptGenRandom`]: https://docs.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptgenrandom
188186//! [`Crypto.getRandomValues`]: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
@@ -240,6 +238,7 @@ cfg_if! {
240238 } else if #[ cfg( any(
241239 target_os = "macos" ,
242240 target_os = "openbsd" ,
241+ target_os = "solaris" ,
243242 target_os = "vita" ,
244243 target_os = "emscripten" ,
245244 ) ) ] {
@@ -249,6 +248,7 @@ cfg_if! {
249248 target_os = "dragonfly" ,
250249 target_os = "freebsd" ,
251250 target_os = "hurd" ,
251+ target_os = "illumos" ,
252252 // Check for target_arch = "arm" to only include the 3DS. Does not
253253 // include the Nintendo Switch (which is target_arch = "aarch64").
254254 all( target_os = "horizon" , target_arch = "arm" ) ,
@@ -302,10 +302,6 @@ cfg_if! {
302302 } else if #[ cfg( any( target_os = "android" , target_os = "linux" ) ) ] {
303303 mod util_libc;
304304 #[ path = "linux_android.rs" ] mod imp;
305- } else if #[ cfg( any( target_os = "illumos" , target_os = "solaris" ) ) ] {
306- mod util_libc;
307- mod use_file;
308- #[ path = "solaris_illumos.rs" ] mod imp;
309305 } else if #[ cfg( target_os = "netbsd" ) ] {
310306 mod util_libc;
311307 #[ path = "netbsd.rs" ] mod imp;
0 commit comments