2222//! | Dragonfly BSD | `*‑dragonfly` | [`/dev/random`][8]
2323//! | Solaris, illumos | `*‑solaris`, `*‑illumos` | [`getrandom()`][9] if available, otherwise [`/dev/random`][10]
2424//! | Fuchsia OS | `*‑fuchsia` | [`cprng_draw`][11]
25- //! | Redox | `*‑cloudabi` | [`rand:`][12]
26- //! | CloudABI | `*‑redox` | [`cloudabi_sys_random_get`][13]
25+ //! | Redox | `*‑redox` | [`rand:`][12]
2726//! | Haiku | `*‑haiku` | `/dev/random` (identical to `/dev/urandom`)
2827//! | SGX | `x86_64‑*‑sgx` | [RDRAND][18]
2928//! | VxWorks | `*‑wrs‑vxworks‑*` | `randABytes` after checking entropy pool initialization with `randSecure`
6867//! that you are building for an environment containing JavaScript, and will
6968//! call the appropriate methods. Both web browser (main window and Web Workers)
7069//! and Node.js environments are supported, invoking the methods
71- //! [described above](#supported-targets). This crate can be built with either
72- //! the [wasm-bindgen](https://github.com/rust-lang/rust-bindgen) or
73- //! [cargo-web](https://github.com/koute/cargo-web) toolchains.
70+ //! [described above](#supported-targets) using the
71+ //! [wasm-bindgen](https://github.com/rust-lang/rust-bindgen) toolchain.
7472//!
7573//! This feature has no effect on targets other than `wasm32-unknown-unknown`.
7674//!
132130//! [10]: https://docs.oracle.com/cd/E86824_01/html/E54777/random-7d.html
133131//! [11]: https://fuchsia.dev/fuchsia-src/zircon/syscalls/cprng_draw
134132//! [12]: https://github.com/redox-os/randd/blob/master/src/main.rs
135- //! [13]: https://github.com/nuxinl/cloudabi#random_get
136133//! [14]: https://www.w3.org/TR/WebCryptoAPI/#Crypto-method-getRandomValues
137134//! [15]: https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback
138135//! [16]: #webassembly-support
149146) ]
150147#![ no_std]
151148#![ warn( rust_2018_idioms, unused_lifetimes, missing_docs) ]
149+ // `matches!` macro was added only in Rust 1.42, which is bigger than our MSRV
150+ #![ allow( clippy:: match_like_matches_macro) ]
152151
153152#[ macro_use]
154153extern crate cfg_if;
@@ -183,8 +182,6 @@ cfg_if! {
183182 } else if #[ cfg( any( target_os = "freebsd" , target_os = "netbsd" ) ) ] {
184183 mod util_libc;
185184 #[ path = "bsd_arandom.rs" ] mod imp;
186- } else if #[ cfg( target_os = "cloudabi" ) ] {
187- #[ path = "cloudabi.rs" ] mod imp;
188185 } else if #[ cfg( target_os = "fuchsia" ) ] {
189186 #[ path = "fuchsia.rs" ] mod imp;
190187 } else if #[ cfg( target_os = "ios" ) ] {
@@ -210,9 +207,7 @@ cfg_if! {
210207 #[ path = "rdrand.rs" ] mod imp;
211208 } else if #[ cfg( all( feature = "js" ,
212209 target_arch = "wasm32" , target_os = "unknown" ) ) ] {
213- #[ cfg_attr( cargo_web, path = "stdweb.rs" ) ]
214- #[ cfg_attr( not( cargo_web) , path = "wasm-bindgen.rs" ) ]
215- mod imp;
210+ #[ path = "js.rs" ] mod imp;
216211 } else if #[ cfg( feature = "custom" ) ] {
217212 use custom as imp;
218213 } else {
0 commit comments