Skip to content

Commit

Permalink
add tokio-util to wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
toger5 committed Feb 28, 2025
1 parent 82e69aa commit b7cdb2b
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions crates/matrix-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,41 @@ features = ["docsrs"]
rustdoc-args = ["--cfg", "docsrs"]

[features]
default = ["e2e-encryption", "automatic-room-key-forwarding", "sqlite", "native-tls"]
testing = ["matrix-sdk-sqlite?/testing", "matrix-sdk-indexeddb?/testing", "matrix-sdk-base/testing", "wiremock", "matrix-sdk-test", "assert_matches2"]
default = [
"e2e-encryption",
"automatic-room-key-forwarding",
"sqlite",
"native-tls",
]
testing = [
"matrix-sdk-sqlite?/testing",
"matrix-sdk-indexeddb?/testing",
"matrix-sdk-base/testing",
"wiremock",
"matrix-sdk-test",
"assert_matches2",
]

e2e-encryption = [
"matrix-sdk-base/e2e-encryption",
"matrix-sdk-sqlite?/crypto-store", # activate crypto-store on sqlite if given
"matrix-sdk-indexeddb?/e2e-encryption", # activate on indexeddb if given
"matrix-sdk-sqlite?/crypto-store", # activate crypto-store on sqlite if given
"matrix-sdk-indexeddb?/e2e-encryption", # activate on indexeddb if given
]
js = ["matrix-sdk-common/js", "matrix-sdk-base/js"]

sqlite = [
"dep:matrix-sdk-sqlite",
"matrix-sdk-sqlite?/state-store",
"matrix-sdk-sqlite?/event-cache"
"matrix-sdk-sqlite?/event-cache",
]
bundled-sqlite = ["sqlite", "matrix-sdk-sqlite?/bundled"]
indexeddb = ["matrix-sdk-indexeddb/state-store"]

qrcode = ["e2e-encryption", "matrix-sdk-base/qrcode"]
automatic-room-key-forwarding = ["e2e-encryption", "matrix-sdk-base/automatic-room-key-forwarding"]
automatic-room-key-forwarding = [
"e2e-encryption",
"matrix-sdk-base/automatic-room-key-forwarding",
]
markdown = ["ruma/markdown"]
native-tls = ["reqwest/native-tls"]
rustls-tls = ["reqwest/rustls-tls"]
Expand Down Expand Up @@ -96,7 +111,7 @@ mime2ext = "0.1.53"
once_cell = { workspace = true }
percent-encoding = "2.3.1"
pin-project-lite = { workspace = true }
rand = { workspace = true , optional = true }
rand = { workspace = true, optional = true }
ruma = { workspace = true, features = [
"rand",
"unstable-msc2448",
Expand All @@ -121,6 +136,7 @@ urlencoding = "2.1.3"
uuid = { workspace = true, features = ["serde", "v4"], optional = true }
vodozemac = { workspace = true }
zeroize = { workspace = true }
tokio-util = "0.7.13"

[target.'cfg(target_arch = "wasm32")'.dependencies]
gloo-timers = { workspace = true, features = ["futures"] }
Expand All @@ -129,12 +145,13 @@ tokio = { workspace = true, features = ["macros"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
backoff = { version = "0.4.0", features = ["tokio"] }
oauth2 = { version = "5.0.0", default-features = false, features = ["reqwest"], optional = true }
oauth2 = { version = "5.0.0", default-features = false, features = [
"reqwest",
], optional = true }
# only activate reqwest's stream feature on non-wasm, the wasm part seems to not
# support *sending* streams, which makes it useless for us.
reqwest = { workspace = true, features = ["stream", "gzip", "http2"] }
tokio = { workspace = true, features = ["fs", "rt", "macros"] }
tokio-util = "0.7.13"
wiremock = { workspace = true, optional = true }

[dev-dependencies]
Expand Down

0 comments on commit b7cdb2b

Please sign in to comment.