Skip to content

Commit 77740f8

Browse files
authored
remove direct stdweb support (#178)
1 parent 9b4bb00 commit 77740f8

File tree

4 files changed

+6
-97
lines changed

4 files changed

+6
-97
lines changed

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
File renamed without changes.

src/lib.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,8 @@
6868
//! that you are building for an environment containing JavaScript, and will
6969
//! call the appropriate methods. Both web browser (main window and Web Workers)
7070
//! 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.
71+
//! [described above](#supported-targets) using the
72+
//! [wasm-bindgen](https://github.com/rust-lang/rust-bindgen) toolchain.
7473
//!
7574
//! This feature has no effect on targets other than `wasm32-unknown-unknown`.
7675
//!
@@ -211,9 +210,7 @@ cfg_if! {
211210
#[path = "rdrand.rs"] mod imp;
212211
} else if #[cfg(all(feature = "js",
213212
target_arch = "wasm32", target_os = "unknown"))] {
214-
#[cfg_attr(cargo_web, path = "stdweb.rs")]
215-
#[cfg_attr(not(cargo_web), path = "wasm-bindgen.rs")]
216-
mod imp;
213+
#[path = "js.rs"] mod imp;
217214
} else if #[cfg(feature = "custom")] {
218215
use custom as imp;
219216
} else {

src/stdweb.rs

-86
This file was deleted.

0 commit comments

Comments
 (0)