chore: Make target-specific dependency formatting more consistent

* Put target-specific dependencies last
* Put cfg(wasm) before cfg(not(wasm))
* Use long table names only where lines get too long otherwise
This commit is contained in:
Jonas Platte
2022-04-29 11:27:30 +02:00
parent aae8989f99
commit 097cb99ae5
3 changed files with 17 additions and 29 deletions

View File

@@ -20,13 +20,12 @@ async-trait = "0.1.53"
ruma = { version = "0.6.0", features = ["client-api-c"] }
serde = "1.0.136"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.17.0", default-features = false, features = ["rt", "sync"] }
instant = { version = "0.1.12", features = ["now"] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
async-lock = "2.5.0"
instant = { version = "0.1.12", features = ["wasm-bindgen", "inaccurate"] }
futures-util = { version = "0.3.21", default-features = false, features = ["channel"] }
wasm-bindgen-futures = "0.4.30"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
tokio = { version = "1.17.0", default-features = false, features = ["rt", "sync"] }
instant = { version = "0.1.12", features = ["now"] }

View File

@@ -51,22 +51,18 @@ anyhow = "1.0.57"
# feature = testing only
http = { version = "0.2.6", optional = true }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.vodozemac]
git = "https://github.com/matrix-org/vodozemac"
rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies.getrandom]
version = "0.2.6"
features = ["js"]
[dependencies.ruma]
version = "0.6.0"
features = ["client-api-c", "rand", "unstable-msc2676", "unstable-msc2677"]
[target.'cfg(target_arch = "wasm32")'.dependencies.vodozemac]
git = "https://github.com/matrix-org/vodozemac"
rev = "e09c93f2c8df9770793abeec57ed984d5e1f3834"
features = ["js"]
[dependencies.ruma]
version = "0.6.0"
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"
[dev-dependencies]
futures = { version = "0.3.21", default-features = false, features = ["executor"] }
@@ -79,4 +75,5 @@ proptest = { version = "1.0.0", default-features = false, features = ["std"] }
tokio = { version = "1.7.0", default-features = false, features = ["macros", "rt-multi-thread"] }
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
getrandom = { version = "0.2.6", features = ["js"] }
wasm-bindgen-test = "0.3.24"

View File

@@ -118,14 +118,9 @@ optional = true
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasm-timer= "0.2.5"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.backoff]
version = "0.4.0"
features = ["tokio"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1.17.0"
default-features = false
features = ["fs", "rt"]
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
backoff = { version = "0.4.0", features = ["tokio"] }
tokio = { version = "1.17.0", default-features = false, features = ["fs", "rt"] }
[dev-dependencies]
anyhow = "1.0.57"
@@ -139,16 +134,13 @@ serde_json = "1.0.79"
tempfile = "3.3.0"
tracing-subscriber = { version = "0.3.11", features = ["env-filter"] }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.tokio]
version = "1.17.0"
default-features = false
features = ["rt-multi-thread", "macros"]
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
getrandom = { version = "0.2.6", default-features = false, features = ["js"] }
wasm-bindgen-test = "0.3.30"
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.17.0", default-features = false, features = ["rt-multi-thread", "macros"] }
[[example]]
name = "cross_signing_bootstrap"
required-features = ["encryption"]