Reduce size of release binary (#592)
This PR makes 3 changes that together reduce binary size by around 25%: - Sets lto="fat" in cargo.toml - Sets panic="abort" in cargo.toml - Sets location-detail=none in RUSTFLAGS Closes #571 An unrelated change: I've replaced the zopfli test file with a smaller one that runs much faster, as well as removing the slow test for issue-133 which was related to an older alpha optimisation that is no longer relevant.
This commit is contained in:
parent
4cb8296b02
commit
98fd4de30a
6 changed files with 5 additions and 21 deletions
1
.github/workflows/oxipng.yml
vendored
1
.github/workflows/oxipng.yml
vendored
|
|
@ -55,6 +55,7 @@ jobs:
|
|||
|
||||
env:
|
||||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
RUSTFLAGS: -Zlocation-detail=none
|
||||
|
||||
steps:
|
||||
- name: Checkout source
|
||||
|
|
|
|||
|
|
@ -95,8 +95,6 @@ path = "src/lib.rs"
|
|||
opt-level = 2
|
||||
|
||||
[profile.release]
|
||||
lto = "thin"
|
||||
lto = "fat"
|
||||
strip = "symbols"
|
||||
|
||||
[profile.dev.package.bitvec]
|
||||
opt-level = 3
|
||||
panic = "abort"
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 31 KiB |
|
|
@ -686,9 +686,9 @@ fn zopfli_mode() {
|
|||
input,
|
||||
&output,
|
||||
&opts,
|
||||
RGB,
|
||||
INDEXED,
|
||||
BitDepth::Eight,
|
||||
RGB,
|
||||
INDEXED,
|
||||
BitDepth::Eight,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -315,21 +315,6 @@ fn issue_129() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_133() {
|
||||
let input = "tests/files/issue-133.png";
|
||||
let (output, mut opts) = get_opts(Path::new(input));
|
||||
opts.optimize_alpha = true;
|
||||
test_it_converts(
|
||||
input,
|
||||
Some((output, opts)),
|
||||
RGBA,
|
||||
BitDepth::Eight,
|
||||
RGBA,
|
||||
BitDepth::Eight,
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_140() {
|
||||
test_it_converts(
|
||||
|
|
|
|||
Loading…
Reference in a new issue