| 1 | [package] |
| 2 | authors = ["Damir Jelić <poljar@termina.org.uk>"] |
| 3 | description = "A high level Matrix client-server library." |
| 4 | edition = "2024" |
| 5 | homepage = "https://github.com/matrix-org/matrix-rust-sdk" |
| 6 | keywords = ["matrix", "chat", "messaging", "ruma", "nio"] |
| 7 | license = "Apache-2.0" |
| 8 | name = "matrix-sdk" |
| 9 | readme = "README.md" |
| 10 | repository = "https://github.com/matrix-org/matrix-rust-sdk" |
| 11 | rust-version.workspace = true |
| 12 | version = "0.18.0" |
| 13 | |
| 14 | [package.metadata.docs.rs] |
| 15 | features = ["docsrs"] |
| 16 | rustdoc-args = ["--cfg", "docsrs", "--generate-link-to-definition"] |
| 17 | |
| 18 | [features] |
| 19 | default = ["e2e-encryption", "automatic-room-key-forwarding", "sqlite"] |
| 20 | testing = [ |
| 21 | "matrix-sdk-sqlite?/testing", |
| 22 | "matrix-sdk-indexeddb?/testing", |
| 23 | "matrix-sdk-base/testing", |
| 24 | "wiremock", |
| 25 | "matrix-sdk-test", |
| 26 | "assert_matches2", |
| 27 | ] |
| 28 | |
| 29 | e2e-encryption = [ |
| 30 | "matrix-sdk-base/e2e-encryption", |
| 31 | # activate crypto-store on sqlite if given |
| 32 | "matrix-sdk-sqlite?/crypto-store", |
| 33 | # activate on indexeddb if given |
| 34 | "matrix-sdk-indexeddb?/e2e-encryption", |
| 35 | ] |
| 36 | js = [ |
| 37 | "matrix-sdk-common/js", |
| 38 | "matrix-sdk-base/js", |
| 39 | ] |
| 40 | |
| 41 | sqlite = [ |
| 42 | "dep:matrix-sdk-sqlite", |
| 43 | "matrix-sdk-sqlite?/state-store", |
| 44 | "matrix-sdk-sqlite?/event-cache", |
| 45 | ] |
| 46 | bundled-sqlite = ["sqlite", "matrix-sdk-sqlite?/bundled"] |
| 47 | indexeddb = [ |
| 48 | "matrix-sdk-indexeddb/state-store", |
| 49 | "matrix-sdk-indexeddb/event-cache-store", |
| 50 | "matrix-sdk-indexeddb/media-store" |
| 51 | ] |
| 52 | |
| 53 | qrcode = ["e2e-encryption", "matrix-sdk-base/qrcode"] |
| 54 | automatic-room-key-forwarding = ["e2e-encryption", "matrix-sdk-base/automatic-room-key-forwarding"] |
| 55 | experimental-send-custom-to-device = ["e2e-encryption", "matrix-sdk-base/experimental-send-custom-to-device"] |
| 56 | |
| 57 | # Enable experimental support for encrypting state events; see |
| 58 | # https://github.com/matrix-org/matrix-rust-sdk/issues/5397. |
| 59 | experimental-encrypted-state-events = [ |
| 60 | "e2e-encryption", |
| 61 | "matrix-sdk-base/experimental-encrypted-state-events", |
| 62 | "matrix-sdk-sqlite/experimental-encrypted-state-events", |
| 63 | "matrix-sdk-test?/experimental-encrypted-state-events", |
| 64 | ] |
| 65 | |
| 66 | experimental-push-secrets = [ |
| 67 | "e2e-encryption", |
| 68 | "matrix-sdk-base/experimental-push-secrets", |
| 69 | "matrix-sdk-sqlite?/experimental-push-secrets", |
| 70 | "matrix-sdk-indexeddb?/experimental-push-secrets", |
| 71 | "ruma/unstable-msc4385", |
| 72 | ] |
| 73 | |
| 74 | markdown = ["ruma/markdown"] |
| 75 | socks = ["reqwest/socks"] |
| 76 | local-server = ["dep:axum", "dep:rand", "dep:tower"] |
| 77 | sso-login = ["local-server"] |
| 78 | # Enable methods that make calls to the federation API. |
| 79 | federation-api = ["ruma/federation-api-c"] |
| 80 | |
| 81 | uniffi = ["dep:uniffi", "matrix-sdk-base/uniffi", "dep:matrix-sdk-ffi-macros"] |
| 82 | |
| 83 | experimental-widgets = ["dep:uuid", "experimental-send-custom-to-device"] |
| 84 | |
| 85 | docsrs = ["e2e-encryption", "sqlite", "indexeddb", "sso-login", "qrcode", "federation-api"] |
| 86 | |
| 87 | # Add support for inline media galleries via msgtypes |
| 88 | unstable-msc4274 = ["ruma/unstable-msc4274", "matrix-sdk-base/unstable-msc4274"] |
| 89 | |
| 90 | experimental-search = ["matrix-sdk-search"] |
| 91 | |
| 92 | experimental-element-recent-emojis = ["matrix-sdk-base/experimental-element-recent-emojis"] |
| 93 | |
| 94 | [dependencies] |
| 95 | anyhow = { workspace = true, optional = true } |
| 96 | anymap2 = { version = "0.13.0", default-features = false } |
| 97 | aquamarine.workspace = true |
| 98 | as_variant.workspace = true |
| 99 | assert_matches2 = { workspace = true, optional = true } |
| 100 | async-channel = "2.5.0" |
| 101 | async-stream.workspace = true |
| 102 | async-trait.workspace = true |
| 103 | async-once-cell.workspace = true |
| 104 | axum = { version = "0.8.4", optional = true } |
| 105 | bytes = { version = "1.11.1", default-features = false, features = ["std"] } |
| 106 | bytesize = { version = "2.3.0", default-features = false, features = ["std"] } |
| 107 | cfg-if.workspace = true |
| 108 | event-listener = "5.4.1" |
| 109 | eyeball.workspace = true |
| 110 | eyeball-im.workspace = true |
| 111 | eyre = { version = "0.6.12", optional = true } |
| 112 | futures-core.workspace = true |
| 113 | futures-util = { workspace = true, features = ["async-await-macro"] } |
| 114 | http.workspace = true |
| 115 | imbl = { workspace = true, features = ["serde"] } |
| 116 | indexmap.workspace = true |
| 117 | itertools.workspace = true |
| 118 | js_int = "0.2.2" |
| 119 | language-tags = { version = "0.3.2" } |
| 120 | matrix-sdk-base.workspace = true |
| 121 | matrix-sdk-common.workspace = true |
| 122 | matrix-sdk-ffi-macros = { workspace = true, optional = true } |
| 123 | matrix-sdk-indexeddb = { workspace = true, optional = true } |
| 124 | matrix-sdk-search = { workspace = true, optional = true } |
| 125 | matrix-sdk-sqlite = { workspace = true, optional = true } |
| 126 | matrix-sdk-test = { workspace = true, optional = true } |
| 127 | mime.workspace = true |
| 128 | mime2ext = "0.1.54" |
| 129 | oauth2.workspace = true |
| 130 | oauth2-reqwest.workspace = true |
| 131 | percent-encoding = "2.3.2" |
| 132 | pin-project-lite.workspace = true |
| 133 | rand = { workspace = true, optional = true } |
| 134 | ruma = { workspace = true, features = [ |
| 135 | "rand", |
| 136 | "unstable-msc2448", |
| 137 | "unstable-msc3930", |
| 138 | "unstable-msc3245-v1-compat", |
| 139 | "unstable-msc4108", |
| 140 | "unstable-msc4278", |
| 141 | ] } |
| 142 | serde.workspace = true |
| 143 | serde_html_form.workspace = true |
| 144 | serde_json.workspace = true |
| 145 | sha2.workspace = true |
| 146 | tempfile.workspace = true |
| 147 | thiserror.workspace = true |
| 148 | tokio-stream = { workspace = true, features = ["sync"] } |
| 149 | tokio-util = "0.7.17" |
| 150 | tower = { version = "0.5.2", features = ["util"], optional = true } |
| 151 | tracing = { workspace = true, features = ["attributes"] } |
| 152 | uniffi = { workspace = true, optional = true } |
| 153 | url = { workspace = true, features = ["serde"] } |
| 154 | urlencoding = "2.1.3" |
| 155 | uuid = { workspace = true, features = ["serde", "v4"], optional = true } |
| 156 | vodozemac.workspace = true |
| 157 | zeroize.workspace = true |
| 158 | |
| 159 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
| 160 | backon = "1.6.0" |
| 161 | # only activate reqwest's stream feature on non-wasm, the wasm part seems to not |
| 162 | # support *sending* streams, which makes it useless for us. |
| 163 | reqwest = { workspace = true, features = ["stream", "gzip", "http2", "rustls"] } |
| 164 | tokio = { workspace = true, features = ["fs", "rt", "macros"] } |
| 165 | wiremock = { workspace = true, optional = true } |
| 166 | |
| 167 | [target.'cfg(target_family = "wasm")'.dependencies] |
| 168 | gloo-timers = { workspace = true, features = ["futures"] } |
| 169 | reqwest = { workspace = true, features = ["gzip", "http2", "rustls"] } |
| 170 | tokio = { workspace = true, features = ["macros"] } |
| 171 | |
| 172 | [dev-dependencies] |
| 173 | anyhow.workspace = true |
| 174 | assert-json-diff.workspace = true |
| 175 | assert_matches.workspace = true |
| 176 | assert_matches2.workspace = true |
| 177 | dirs = "6.0.0" |
| 178 | futures-executor.workspace = true |
| 179 | insta.workspace = true |
| 180 | matrix-sdk-base = { workspace = true, features = ["testing"] } |
| 181 | matrix-sdk-test.workspace = true |
| 182 | matrix-sdk-test-utils.workspace = true |
| 183 | serde_urlencoded = "0.7.1" |
| 184 | similar-asserts.workspace = true |
| 185 | stream_assert.workspace = true |
| 186 | tokio-test = "0.4.4" |
| 187 | tracing-subscriber = { workspace = true, features = ["env-filter"] } |
| 188 | |
| 189 | [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] |
| 190 | ctor = "0.2.9" |
| 191 | proptest.workspace = true |
| 192 | tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } |
| 193 | wiremock.workspace = true |
| 194 | |
| 195 | [target.'cfg(target_family = "wasm")'.dev-dependencies] |
| 196 | wasm-bindgen-test.workspace = true |
| 197 | |
| 198 | [target.'cfg(target_os = "android")'.dependencies] |
| 199 | rustls = "0.23.38" |
| 200 | rustls-pki-types = "1.14.0" |
| 201 | rustls-native-certs = "0.8.3" |
| 202 | webpki-roots = "1.0.6" |
| 203 | |
| 204 | [[test]] |
| 205 | name = "integration" |
| 206 | required-features = ["testing"] |
| 207 | |
| 208 | [[test]] |
| 209 | name = "response_commit" |
| 210 | required-features = ["testing", "e2e-encryption"] |
| 211 | |
| 212 | [[test]] |
| 213 | name = "history_reseed" |
| 214 | required-features = ["testing"] |
| 215 | |
| 216 | [[test]] |
| 217 | name = "segmented_history" |
| 218 | required-features = ["testing"] |
| 219 | |
| 220 | [[test]] |
| 221 | name = "recent_history" |
| 222 | required-features = ["testing"] |
| 223 | |
| 224 | [lints] |
| 225 | workspace = true |