Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,12 @@ lto = true
# Use binary size optimization, since this is intended for distributed copies of the SDK
opt-level = "s"

# Profile for the distributed Apple framework. `opt-level = "s"` measured ~33%
# smaller linked code than `release`.
[profile.apple-release]

@pixlwave pixlwave Jul 8, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should call this swift-release given it will be used by the swift xtask?

inherits = "release"
opt-level = "s"

[profile.profiling]
inherits = "release"
# LTO is too slow to compile.
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/swift.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl SwiftArgs {
// The dev profile seems to cause crashes on some platforms so we default to
// reldbg (https://github.com/matrix-org/matrix-rust-sdk/issues/4009)
let profile =
profile.as_deref().unwrap_or(if release { "release" } else { "reldbg" });
profile.as_deref().unwrap_or(if release { "apple-release" } else { "reldbg" });
build_xcframework(
profile,
targets,
Expand Down
Loading