Skip to content

Commit

Permalink
Use strip = true to shrink the binary.
Browse files Browse the repository at this point in the history
Also set `rust-version` to 1.59, the earliest version that supports
`strip`.
  • Loading branch information
nnethercote committed Jul 28, 2023
1 parent cb6ec63 commit 53cab44
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion Cargo.toml
Expand Up @@ -10,6 +10,7 @@ repository = "https://github.com/nnethercote/counts"
keywords = ["cli", "profiling"]
categories = ["command-line-utilities", "development-tools::profiling"]
edition = "2021"
rust-version = "1.59"

[dependencies]
regex-lite = "0.1"
Expand All @@ -21,6 +22,17 @@ predicates = "3.0"
tempfile = "3.0"

# These options make the binary a bit smaller.
# Data from v1.0.3, 2023-07-28:
# --------------------------------------
# config Linux Mac
# --------------------------------------
# base 4632976 773728
# + lto = true 2340584 676192
# + panic = abort 2313104 639032
# + strip = "debuginfo" 486936 536496
# -> strip = true 486968 464816
# --------------------------------------
[profile.release]
panic = "abort"
lto = true
panic = "abort"
strip = true

0 comments on commit 53cab44

Please sign in to comment.