| 1 | [package] |
| 2 | name = "matrix-sdk-ffi" |
| 3 | version = "0.18.0" |
| 4 | edition = "2024" |
| 5 | homepage = "https://github.com/matrix-org/matrix-rust-sdk" |
| 6 | keywords = ["matrix", "chat", "messaging", "ffi"] |
| 7 | license = "Apache-2.0" |
| 8 | readme = "README.md" |
| 9 | rust-version.workspace = true |
| 10 | repository = "https://github.com/matrix-org/matrix-rust-sdk" |
| 11 | publish = false |
| 12 | |
| 13 | [package.metadata.release] |
| 14 | release = true |
| 15 | |
| 16 | [lib] |
| 17 | crate-type = [ |
| 18 | # Needed by uniffi for Android bindings |
| 19 | "cdylib", |
| 20 | # Needed by uniffi for iOS bindings |
| 21 | "staticlib", |
| 22 | # Needed by uniffi for JS/Wasm bindings, which use rust as an intermediate language |
| 23 | "lib" |
| 24 | ] |
| 25 | |
| 26 | [features] |
| 27 | default = ["bundled-sqlite", "unstable-msc4274", "experimental-element-recent-emojis", "experimental-push-secrets", "experimental-search"] |
| 28 | experimental-search = ["matrix-sdk/experimental-search"] |
| 29 | # Use SQLite for the session storage. |
| 30 | sqlite = ["matrix-sdk/sqlite"] |
| 31 | # Use an embedded version of SQLite. |
| 32 | bundled-sqlite = ["sqlite", "matrix-sdk/bundled-sqlite"] |
| 33 | # Use IndexedDB for the session storage. |
| 34 | indexeddb = ["matrix-sdk/indexeddb"] |
| 35 | unstable-msc4274 = ["matrix-sdk-ui/unstable-msc4274"] |
| 36 | # Required when targeting a Javascript environment, like Wasm in a browser. |
| 37 | js = ["matrix-sdk-ui/js"] |
| 38 | # Enable sentry error monitoring, not compatible with Wasm platforms. |
| 39 | sentry = ["dep:sentry", "dep:sentry-tracing"] |
| 40 | |
| 41 | experimental-element-recent-emojis = ["matrix-sdk/experimental-element-recent-emojis"] |
| 42 | experimental-push-secrets = ["matrix-sdk/experimental-push-secrets"] |
| 43 | |
| 44 | [dependencies] |
| 45 | anyhow.workspace = true |
| 46 | chrono.workspace = true |
| 47 | extension-trait = "1.0.2" |
| 48 | eyeball-im.workspace = true |
| 49 | futures-util.workspace = true |
| 50 | language-tags = "0.3.2" |
| 51 | log-panics = { version = "2.1.0", default-features = false, features = ["with-backtrace"] } |
| 52 | matrix-sdk = { workspace = true, features = [ |
| 53 | "anyhow", |
| 54 | "e2e-encryption", |
| 55 | "experimental-widgets", |
| 56 | "markdown", |
| 57 | "socks", |
| 58 | "uniffi", |
| 59 | "federation-api", |
| 60 | "experimental-search" |
| 61 | ] } |
| 62 | matrix-sdk-base.workspace = true |
| 63 | matrix-sdk-common.workspace = true |
| 64 | matrix-sdk-ffi-macros.workspace = true |
| 65 | matrix-sdk-ui = { workspace = true, features = ["uniffi"] } |
| 66 | mime = { version = "0.3.17", default-features = false } |
| 67 | ruma = { workspace = true, features = [ |
| 68 | "html", |
| 69 | "unstable-msc3488", |
| 70 | "compat-unset-avatar", |
| 71 | "unstable-msc3245-v1-compat", |
| 72 | "unstable-msc4278", |
| 73 | "unstable-msc3230", |
| 74 | # Audio event type |
| 75 | "unstable-msc3927", |
| 76 | # File event type |
| 77 | "unstable-msc3551", |
| 78 | # Image event type |
| 79 | "unstable-msc3552", |
| 80 | # Video event type |
| 81 | "unstable-msc3553", |
| 82 | # Voice event type |
| 83 | "unstable-msc3245", |
| 84 | # Emote event type |
| 85 | "unstable-msc3954", |
| 86 | # Image pack event type |
| 87 | "unstable-msc2545", |
| 88 | # Room language event type |
| 89 | "unstable-msc4334", |
| 90 | ] } |
| 91 | serde.workspace = true |
| 92 | serde_json.workspace = true |
| 93 | sentry = { workspace = true, optional = true, features = [ |
| 94 | # Most default features enabled otherwise. |
| 95 | "backtrace", |
| 96 | "contexts", |
| 97 | "debug-images", |
| 98 | "panic", |
| 99 | "reqwest", |
| 100 | "sentry-debug-images", |
| 101 | ] } |
| 102 | sentry-tracing = { workspace = true, optional = true } |
| 103 | thiserror.workspace = true |
| 104 | tracing.workspace = true |
| 105 | tracing-appender.workspace = true |
| 106 | tracing-core.workspace = true |
| 107 | tracing-subscriber = { workspace = true, features = ["env-filter"] } |
| 108 | url.workspace = true |
| 109 | uuid = { version = "1.4.1", default-features = false, features = ["std", "v4"] } |
| 110 | zeroize.workspace = true |
| 111 | oauth2.workspace = true |
| 112 | |
| 113 | [target.'cfg(target_family = "wasm")'.dependencies] |
| 114 | console_error_panic_hook = { version = "0.1.7", default-features = false } |
| 115 | tokio = { workspace = true, features = ["sync", "macros"] } |
| 116 | uniffi = { workspace = true, features = ["wasm-unstable-single-threaded"] } |
| 117 | futures-executor.workspace = true |
| 118 | |
| 119 | [target.'cfg(not(target_family = "wasm"))'.dependencies] |
| 120 | async-compat.workspace = true |
| 121 | tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } |
| 122 | uniffi = { workspace = true, features = ["tokio"] } |
| 123 | |
| 124 | [target.'cfg(target_os = "android")'.dependencies] |
| 125 | paranoid-android = { version = "0.2.2", default-features = false } |
| 126 | # Needed for `rustls-platform-verifier`. Newer versions aren't compatible with it. |
| 127 | jni = "0.21.1" |
| 128 | # Used to access the credential storage on Android |
| 129 | rustls-platform-verifier = "0.6.2" |
| 130 | # Needed for intializing and keeping the JavaVM reference around |
| 131 | once_cell = "1.21.4" |
| 132 | # Gobley's jvm-getter is used to get a JVM pointer from all Android versions |
| 133 | jvm-getter = "0.1.0" |
| 134 | |
| 135 | [dev-dependencies] |
| 136 | matrix-sdk = { workspace = true, features = ["testing"] } |
| 137 | similar-asserts.workspace = true |
| 138 | tempfile.workspace = true |
| 139 | tokio = { workspace = true, features = ["rt-multi-thread", "macros", "time"] } |
| 140 | |
| 141 | [build-dependencies] |
| 142 | uniffi = { workspace = true, features = ["build"] } |
| 143 | vergen-gitcl = { workspace = true, features = ["build"] } |
| 144 | |
| 145 | [lints] |
| 146 | workspace = true |