Skip to content

Commit 7183183

Browse files
committed
Merge branch 'master' into winxp
2 parents bcc53e2 + cadf11e commit 7183183

File tree

6 files changed

+13
-127
lines changed

6 files changed

+13
-127
lines changed

.github/workflows/tests.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,10 @@ jobs:
6666
target: ${{ matrix.target }}
6767
toolchain: stable
6868
override: true
69-
- run: sudo apt install gcc-multilib
69+
# update is needed to fix the 404 error on install, see:
70+
# https://github.com/actions/virtual-environments/issues/675
71+
- run: sudo apt-get update
72+
- run: sudo apt-get install gcc-multilib
7073
- run: cargo test --target ${{ matrix.target }}
7174

7275
windows-tests:

Cargo.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ libc = { version = "0.2.64", default-features = false }
2727
[target.'cfg(target_os = "wasi")'.dependencies]
2828
wasi = "0.10"
2929

30-
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown", cargo_web))'.dependencies]
31-
stdweb = { version = "0.4.18", default-features = false, optional = true }
32-
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown", not(cargo_web)))'.dependencies]
30+
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies]
3331
wasm-bindgen = { version = "0.2.62", default-features = false, optional = true }
3432
js-sys = { version = "0.3", optional = true }
35-
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown", not(cargo_web)))'.dev-dependencies]
33+
[target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dev-dependencies]
3634
wasm-bindgen-test = "0.3.18"
3735

3836
[features]
@@ -41,7 +39,7 @@ std = []
4139
# Feature to enable fallback RDRAND-based implementation on x86/x86_64
4240
rdrand = []
4341
# Feature to enable JavaScript bindings on wasm32-unknown-unknown
44-
js = ["stdweb", "wasm-bindgen", "js-sys"]
42+
js = ["wasm-bindgen", "js-sys"]
4543
# Feature to enable custom RNG implementations
4644
custom = []
4745
# Unstable feature to support being a libstd dependency

src/cloudabi.rs

-24
This file was deleted.
File renamed without changes.

src/lib.rs

+6-11
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,7 @@
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`
@@ -68,9 +67,8 @@
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
//!
@@ -132,7 +130,6 @@
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
@@ -149,6 +146,8 @@
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]
154153
extern 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 {

src/stdweb.rs

-86
This file was deleted.

0 commit comments

Comments
 (0)