Skip to content
Merged
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
23 changes: 23 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,19 @@ unused_async = "warn"
# Saves a lot of disk space. If symbols are needed, use the dbg profile.
debug = 0

# Profile for debug builds with full optimization and minimal debug symbols.
# This should be just enough to have proper backtraces, having way smaller binaries
# (10% of the size with full debug symbols profile, like `reldbg`).
# This profile differs from `reldbg` in not containing the debug symbols needed for
# debugging with LLDB/GDB, trading that for binary size, allowing quick iterations
# of building the bindings, installing in a real device, testing your changes, repeat.
# It's also different from `dev` in having enough debug symbols to display backtraces.
[profile.reldev]
inherits = "dev"
opt-level = 3
debug = "line-tables-only"
strip = "debuginfo"

[profile.dev.package]
# Optimize quote even in debug mode. Speeds up proc-macros enough to account
# for the extra time of optimizing it for a clean build of matrix-sdk-ffi.
Expand All @@ -189,6 +202,16 @@ debug = 2
inherits = "dbg"
opt-level = 3

[profile.dist]
# Use release profile as a base
inherits = "release"
# Strip the minimal debug info, while still allowing us to have proper backtraces, but it will affect debuggers
strip = "debuginfo"
# Use link time optimizations
lto = true
# Use binary size optimization, since this is intended for distributed copies of the SDK
opt-level = "s"

[profile.profiling]
inherits = "release"
# LTO is too slow to compile.
Expand Down
1 change: 1 addition & 0 deletions bindings/matrix-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ sentry = { workspace = true, optional = true, default-features = false, features
# Most default features enabled otherwise.
"backtrace",
"contexts",
"debug-images",
"panic",
"reqwest",
"sentry-debug-images",
Expand Down
Loading