Skip to content

Commit

Permalink
feat: slim binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
YOU54F committed Feb 24, 2024
1 parent 550a851 commit 5fa4d95
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,20 @@ trim-margin = "0.1.0"
[build-dependencies]
built = { version = "0.7.1", features = [ "git2" ] }
os_info = "3.7.0"

[profile.release]
strip = true # Automatically strip symbols from the binary.
opt-level = "z" # Optimize for size.
codegen-units = 1
panic = "abort"
# lto = true
# https://github.com/johnthagen/min-sized-rust

## Original Sizes
# 24M libpact_ffi.dylib
# 19M pact_verifier_cli
# 18M pact_mock_server_cli

# libpactffi.dylib size 24M -> 9.4M
# pact_verifier_cli size 19M -> 6.4M
# pact_mock_server_cli size 19M -> 5.6M

0 comments on commit 5fa4d95

Please sign in to comment.