diff --git a/clients/webassembly/Cargo.toml b/clients/webassembly/Cargo.toml index b46c39fb63..8f2826def4 100644 --- a/clients/webassembly/Cargo.toml +++ b/clients/webassembly/Cargo.toml @@ -27,8 +27,8 @@ rand = { version = "0.7.3", features = ["wasm-bindgen"] } crypto = { path = "../../common/crypto" } nymsphinx = { path = "../../common/nymsphinx" } topology = { path = "../../common/topology" } -gateway-client = { path = "../../common/client-libs/gateway-client", features = ["wasm"] } -validator-client = { path = "../../common/client-libs/validator-client", features = ["wasm"] } +gateway-client = { path = "../../common/client-libs/gateway-client" } +validator-client = { path = "../../common/client-libs/validator-client" } wasm-utils = { path = "../../common/wasm-utils" } # The `console_error_panic_hook` crate provides better debugging of panics by diff --git a/common/client-libs/gateway-client/Cargo.toml b/common/client-libs/gateway-client/Cargo.toml index ab30379515..c357a9d3dc 100644 --- a/common/client-libs/gateway-client/Cargo.toml +++ b/common/client-libs/gateway-client/Cargo.toml @@ -32,20 +32,16 @@ version = "0.14" # wasm-only dependencies [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen] -optional = true version = "0.2" [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-bindgen-futures] -optional = true version = "0.4" [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-utils] -optional = true path = "../../wasm-utils" # only import it in wasm. Prefer proper tokio timer in non-wasm [target."cfg(target_arch = \"wasm32\")".dependencies.wasm-timer] -optional = true version = "0.2" # this is due to tungstenite using `rand` 0.8 and associated changes in `getrandom` crate @@ -54,14 +50,9 @@ version = "0.2" # containing javascript (such as a web browser or node.js). # refer to https://docs.rs/getrandom/0.2.2/getrandom/#webassembly-support for more information [target."cfg(target_arch = \"wasm32\")".dependencies.getrandom] -optional = true version = "0.2" +features = ["js"] [dev-dependencies] # for tests #url = "2.1" - -[features] -# the reason for introducing additional features is to let cargo know we don't want anything to do with "getrandom/js" -# by default as it messes up with cyclic dependencies for ahash that's indirectly used by sqlx in validator-api -wasm = ["getrandom/js", "wasm-timer", "wasm-utils", "wasm-bindgen-futures", "wasm-bindgen"] diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index be7143dd6a..626c327082 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -20,9 +20,5 @@ wasm-timer = "0.2" [target."cfg(target_arch = \"wasm32\")".dependencies.getrandom] version = "0.2" -optional = true +features = ["js"] -[features] -# the reason for introducing additional features is to let cargo know we don't want anything to do with "getrandom/js" -# by default as it messes up with cyclic dependencies for ahash that's indirectly used by sqlx in validator-api -wasm = ["getrandom/js"]