From 7569c08adaa80a2becb74045246f2eb7c80381ac Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Mon, 9 May 2022 10:40:13 +0200 Subject: [PATCH] feat(crypto) Add `wasm-bindgen` as a dep and simplify `Cargo.toml`. --- crates/matrix-sdk-crypto/Cargo.toml | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/crates/matrix-sdk-crypto/Cargo.toml b/crates/matrix-sdk-crypto/Cargo.toml index 8b3efda5c..f7687f30f 100644 --- a/crates/matrix-sdk-crypto/Cargo.toml +++ b/crates/matrix-sdk-crypto/Cargo.toml @@ -49,22 +49,14 @@ thiserror = "1.0.30" tracing = "0.1.34" zeroize = { version = "1.3.0", features = ["zeroize_derive"] } -[target.'cfg(target_arch = "wasm32")'.dependencies.ruma] -version = "0.6.1" -features = ["client-api-c", "js", "rand", "unstable-msc2676", "unstable-msc2677"] +[target.'cfg(not(target_arch = "wasm32"))'.dependencies] +ruma = { version = "0.6.1", features = ["client-api-c", "rand", "unstable-msc2676", "unstable-msc2677"] } +vodozemac = { git = "https://github.com/matrix-org/vodozemac", rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834" } -[target.'cfg(target_arch = "wasm32")'.dependencies.vodozemac] -git = "https://github.com/matrix-org/vodozemac" -rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834" -features = ["js"] - -[target.'cfg(not(target_arch = "wasm32"))'.dependencies.ruma] -version = "0.6.1" -features = ["client-api-c", "rand", "unstable-msc2676", "unstable-msc2677"] - -[target.'cfg(not(target_arch = "wasm32"))'.dependencies.vodozemac] -git = "https://github.com/matrix-org/vodozemac" -rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834" +[target.'cfg(target_arch = "wasm32")'.dependencies] +ruma = { version = "0.6.1", features = ["client-api-c", "js", "rand", "unstable-msc2676", "unstable-msc2677"] } +vodozemac = { git = "https://github.com/matrix-org/vodozemac", rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834", features = ["js"] } +wasm-bindgen = "0.2.80" [dev-dependencies] futures = { version = "0.3.21", default-features = false, features = ["executor"] }