diff --git a/futures-util/Cargo.toml b/futures-util/Cargo.toml index 617fcff471..578d50b9d5 100644 --- a/futures-util/Cargo.toml +++ b/futures-util/Cargo.toml @@ -30,6 +30,10 @@ channel = ["std", "futures-channel-preview"] join-macro = ["async-await", "futures-join-macro-preview", "proc-macro-hack", "proc-macro-nested"] select-macro = ["async-await", "futures-select-macro-preview", "proc-macro-hack", "proc-macro-nested", "rand"] +# re-export optional WASM dependencies to avoid breakage in getrandom: +wasm-bindgen = ["rand/wasm-bindgen"] +stdweb = ["rand/stdweb"] + [dependencies] futures-core-preview = { path = "../futures-core", version = "=0.3.0-alpha.18", default-features = false } futures-channel-preview = { path = "../futures-channel", version = "=0.3.0-alpha.18", default-features = false, features = ["std"], optional = true } diff --git a/futures/Cargo.toml b/futures/Cargo.toml index 14fe4fdf1e..d38499c861 100644 --- a/futures/Cargo.toml +++ b/futures/Cargo.toml @@ -45,5 +45,9 @@ compat = ["std", "futures-util-preview/compat"] io-compat = ["compat", "futures-util-preview/io-compat"] cfg-target-has-atomic = ["futures-core-preview/cfg-target-has-atomic", "futures-channel-preview/cfg-target-has-atomic", "futures-util-preview/cfg-target-has-atomic"] +# re-export optional WASM dependencies to avoid breakage in rand: +wasm-bindgen = ["futures-util-preview/wasm-bindgen"] +stdweb = ["futures-util-preview/stdweb"] + [package.metadata.docs.rs] all-features = true