Removed wasm feature bypassing cycling dependencies (#723)

This commit is contained in:
Jędrzej Stuczyński
2021-08-06 11:00:15 +01:00
committed by GitHub
parent 4c1c6d86c8
commit d643df74b3
3 changed files with 4 additions and 17 deletions
+2 -2
View File
@@ -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
+1 -10
View File
@@ -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"]
@@ -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"]