Commit 9c6ff58b96

9c6ff58b968f1b5bcfe995b8d65761160b98c3e9

parent: b41faff9b7

Unregistered key

Ulyssa <git@ulyssa.dev> · 2024-03-20 04:55 UTC
committer: <noreply@github.com>

Support linking against system OpenSSL (#218)

Layout: unified · split

Cargo.toml +7 −1
@@ -14,6 +14,12 @@ categories = ["command-line-utilities"]
14rust-version = "1.70" 14rust-version = "1.70"
15build = "build.rs" 15build = "build.rs"
16 16
17[features]
18default = ["bundled"]
19bundled = ["matrix-sdk/bundled-sqlite", "rustls-tls"]
20native-tls = ["matrix-sdk/native-tls"]
21rustls-tls = ["matrix-sdk/rustls-tls"]
22
17[build-dependencies] 23[build-dependencies]
18mandown = "0.1.3" 24mandown = "0.1.3"
19 25
@@ -71,7 +77,7 @@ version = "0.0.18"
71[dependencies.matrix-sdk] 77[dependencies.matrix-sdk]
72version = "0.7.1" 78version = "0.7.1"
73default-features = false 79default-features = false
74features = ["e2e-encryption", "rustls-tls", "bundled-sqlite", "sso-login"] 80features = ["e2e-encryption", "sqlite", "sso-login"]
75 81
76[dependencies.tokio] 82[dependencies.tokio]
77version = "1.24.1" 83version = "1.24.1"
PACKAGING.md added +27
@@ -0,0 +1,27 @@
1# Notes For Package Maintainers
2
3## Linking Against System Packages
4
5The default Cargo features for __iamb__ will bundle SQLite and use [rustls] for
6TLS. Package maintainers may want to link against the system's native SQLite
7and TLS libraries instead. To do so, you'll want to build without the default
8features and specify that it should build with `native-tls`:
9
10```
11% cargo build --release --no-default-features --features=native-tls
12```
13
14## Enabling LTO
15
16Enabling LTO can result in smaller binaries. There is a separate profile to
17enable it when building:
18
19```
20% cargo build --profile release-lto
21```
22
23Note that this [can fail][ring-lto] in some build environments if both Clang
24and GCC are present.
25
26[ring-lto]: https://github.com/briansmith/ring/issues/1444
27[rustls]: https://crates.io/crates/rustls