diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df74d2f259..afd5662fd7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -429,7 +429,8 @@ jobs: strategy: matrix: features: - - # Default + - --features=wasm32_unknown_unknown_js + - --no-default-features --features=wasm32_unknown_unknown_js host_os: - ubuntu-18.04 diff --git a/Cargo.toml b/Cargo.toml index f6c11567ac..70efc1b88c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -174,7 +174,7 @@ once_cell = { version = "1.8.0", default-features = false, features=["std"], opt once_cell = { version = "1.8.0", default-features = false, features=["std"] } [target.'cfg(all(target_arch = "wasm32", target_vendor = "unknown", target_os = "unknown", target_env = ""))'.dependencies] -web-sys = { version = "0.3.51", default-features = false, features = ["Crypto", "Window"] } +web-sys = { version = "0.3.51", default-features = false, features = ["Crypto", "Window"], optional = true } [target.'cfg(target_os = "windows")'.dependencies] winapi = { version = "0.3.9", default-features = false, features = ["ntsecapi", "wtypesbase", "processthreadsapi"] } @@ -199,6 +199,7 @@ dev_urandom_fallback = ["once_cell"] slow_tests = [] std = ["alloc"] test_logging = [] +wasm32_unknown_unknown_js = ["web-sys"] # XXX: debug = false because of https://github.com/rust-lang/rust/issues/34122 diff --git a/src/lib.rs b/src/lib.rs index ff5c94f6a4..f61d249743 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -33,7 +33,11 @@ //!
std
//! std::error::Error
integration. Implies `alloc`.
-//!
+//! wasm32_unknown_unknown_js
+//!