Skip to content

Commit c2aecb0

Browse files
committed
Merge #220: Add build profile 'release-smaller'
ba71a7a Add build profile 'release-smaller' (Steve Myers) Pull request description: ### Description New profile turns on all the non-experimental rust build size optimizations. ### Notes to the reviewers This PR is the first step to fixing bitcoindevkit/bdk-swift#25. ### Changelog notice None. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: thunderbiscuit: ACK [ba71a7a](ba71a7a). Tree-SHA512: b12cf3a3ad3683dccbb89f611e98246db4a604b674077a45b78e30e9e20021f443dfec68e8ab511e0bb64d84c5c7064b4078b578fc3b4c1fb2e1119680a656a6
2 parents 036e790 + ba71a7a commit c2aecb0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,11 @@ uniffi = { version = "0.21.0", features = ["builtin-bindgen"] }
2222

2323
[build-dependencies]
2424
uniffi_build = { version = "0.21.0", features = ["builtin-bindgen"] }
25+
26+
[profile.release-smaller]
27+
inherits = "release"
28+
opt-level = 'z' # Optimize for size.
29+
lto = true # Enable Link Time Optimization
30+
codegen-units = 1 # Reduce number of codegen units to increase optimizations.
31+
panic = 'abort' # Abort on panic
32+
strip = true # Strip symbols from binary*

0 commit comments

Comments
 (0)