Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use rustls for Swift to support TLS 1.3 #3113

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
36 changes: 5 additions & 31 deletions bindings/matrix-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ repository = "https://github.com/matrix-org/matrix-rust-sdk"
crate-type = ["cdylib", "staticlib"]

[features]
default = ["bundled-sqlite"]
default = ["bundled-sqlite", "rustls-tls"]

bundled-sqlite = ["matrix-sdk/bundled-sqlite"]
native-tls = ["matrix-sdk/native-tls"]
rustls-tls = ["matrix-sdk/rustls-tls"]

[build-dependencies]
uniffi = { workspace = true, features = ["build"] }
Expand All @@ -29,6 +32,7 @@ eyeball-im = { workspace = true }
extension-trait = "1.0.1"
futures-core = { workspace = true }
futures-util = { workspace = true }
matrix-sdk = { workspace = true, features = ["anyhow", "e2e-encryption", "experimental-oidc", "experimental-sliding-sync", "experimental-widgets", "markdown", "socks", "sqlite", "uniffi"] }
matrix-sdk-ui = { workspace = true, features = ["e2e-encryption", "uniffi"] }
mime = "0.3.16"
once_cell = { workspace = true }
Expand Down Expand Up @@ -56,33 +60,3 @@ language-tags = "0.3.2"
[target.'cfg(target_os = "android")'.dependencies]
log-panics = { version = "2", features = ["with-backtrace"] }
paranoid-android = "0.2.1"

[target.'cfg(target_os = "android")'.dependencies.matrix-sdk]
workspace = true
features = [
"anyhow",
"e2e-encryption",
"experimental-oidc",
"experimental-sliding-sync",
"experimental-widgets",
"markdown",
"rustls-tls", # note: differ from block below
"socks",
"sqlite",
"uniffi",
]

[target.'cfg(not(target_os = "android"))'.dependencies.matrix-sdk]
workspace = true
features = [
"anyhow",
"e2e-encryption",
"experimental-oidc",
"experimental-sliding-sync",
"experimental-widgets",
"markdown",
"native-tls", # note: differ from block above
"socks",
"sqlite",
"uniffi",
]
4 changes: 0 additions & 4 deletions crates/matrix-sdk/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ fn main() {
native_tls_set || rustls_tls_set,
"one of the features 'native-tls' or 'rustls-tls' must be enabled",
);
ensure(
!native_tls_set || !rustls_tls_set,
"only one of the features 'native-tls' or 'rustls-tls' can be enabled",
);

let is_wasm = env::var_os("CARGO_CFG_TARGET_ARCH").is_some_and(|arch| arch == "wasm32");
if is_wasm {
Expand Down