From 9ccf39b49a883dd29139b4185c0a9be186553311 Mon Sep 17 00:00:00 2001 From: Josh Holmer Date: Wed, 11 Nov 2020 14:43:42 -0500 Subject: [PATCH] Version 4.0.0 --- CHANGELOG.md | 8 ++++++++ Cargo.lock | 41 +++++++---------------------------------- Cargo.toml | 4 ++-- README.md | 24 ++++++++++++------------ README.template.md | 2 +- build.rs | 2 +- 6 files changed, 31 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 42f783fe..c5027030 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +### Version 4.0.0 +- [Breaking] Bump minimum Rust version to 1.45.0 +- [Feature] Make `libdeflater` and `zopfli` optional for API users +- [Bugfix] Fix cloudflare-zlib on aarch64 CPUs +- [Bugfix] Don't exit on finding a non-PNG file when crawling recursively +- [Bugfix] Make `rayon` truly optional +- Various internal improvements + ### Version 3.0.1 - [Bugfix] Re-add `--force` flag to CLI - This was accidentally removed somehow diff --git a/Cargo.lock b/Cargo.lock index ba0affde..8d70e4f7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -162,16 +162,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - [[package]] name = "crossbeam-channel" version = "0.5.0" @@ -179,7 +169,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils 0.8.0", + "crossbeam-utils", ] [[package]] @@ -190,7 +180,7 @@ checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", - "crossbeam-utils 0.8.0", + "crossbeam-utils", ] [[package]] @@ -201,23 +191,12 @@ checksum = "ec0f606a85340376eef0d6d8fec399e6d4a544d648386c6645eb6d0653b27d9f" dependencies = [ "cfg-if 1.0.0", "const_fn", - "crossbeam-utils 0.8.0", + "crossbeam-utils", "lazy_static", "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static", -] - [[package]] name = "crossbeam-utils" version = "0.8.0" @@ -341,12 +320,6 @@ dependencies = [ "cfg-if 0.1.10", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memoffset" version = "0.5.6" @@ -428,14 +401,14 @@ dependencies = [ [[package]] name = "oxipng" -version = "3.0.1" +version = "4.0.0" dependencies = [ "bit-vec", "byteorder", "clap", "cloudflare-zlib", "crc", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "image", "indexmap", "itertools", @@ -489,9 +462,9 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ - "crossbeam-channel 0.5.0", + "crossbeam-channel", "crossbeam-deque", - "crossbeam-utils 0.8.0", + "crossbeam-utils", "lazy_static", "num_cpus", ] diff --git a/Cargo.toml b/Cargo.toml index 3a3b7cbc..f39a8d93 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ license = "MIT" name = "oxipng" repository = "https://github.com/shssoichiro/oxipng" build = "build.rs" -version = "3.0.1" +version = "4.0.0" [badges] travis-ci = { repository = "shssoichiro/oxipng", branch = "master" } @@ -40,7 +40,7 @@ indexmap = "1.6.0" libdeflater = { version = "0.5.0", optional = true } log = "0.4.11" stderrlog = { version = "0.5.0", optional = true } -crossbeam-channel = "0.4.4" +crossbeam-channel = "0.5.0" [dependencies.rayon] optional = true diff --git a/README.md b/README.md index be6df962..1e222157 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ cargo build --release cp target/release/oxipng /usr/local/bin ``` -The current minimum supported Rust version is **1.47.0**. +The current minimum supported Rust version is **1.45.0**. Oxipng follows Semantic Versioning. @@ -97,36 +97,36 @@ Oxipng is open-source software, distributed under the MIT license. ## Benchmarks -Tested oxipng 3.0.1 (compiled on rustc 1.45.0 (5c1f21c3b 2020-07-13)) against OptiPNG version 0.7.7 on Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz with 8 logical cores +Tested oxipng 4.0.0 (compiled on rustc 1.47.0 (18bf6b4f0 2020-10-07)) against OptiPNG version 0.7.7 on AMD Ryzen 7 4800H with Radeon Graphics with 16 logical cores ``` Benchmark #1: ./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png - Time (mean ± σ): 101.6 ms ± 5.9 ms [User: 261.6 ms, System: 16.5 ms] - Range (min … max): 94.7 ms … 113.3 ms 28 runs + Time (mean ± σ): 125.8 ms ± 16.7 ms [User: 296.4 ms, System: 19.5 ms] + Range (min … max): 99.4 ms … 154.2 ms 24 runs Benchmark #2: optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png - Time (mean ± σ): 294.0 ms ± 3.5 ms [User: 293.5 ms, System: 0.6 ms] - Range (min … max): 290.4 ms … 300.5 ms 10 runs + Time (mean ± σ): 248.8 ms ± 20.5 ms [User: 247.6 ms, System: 1.6 ms] + Range (min … max): 210.6 ms … 267.5 ms 12 runs Summary './target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran - 2.89 ± 0.17 times faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' + 1.98 ± 0.31 times faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' Benchmark #1: ./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png - Time (mean ± σ): 131.6 ms ± 6.1 ms [User: 509.8 ms, System: 17.1 ms] - Range (min … max): 123.5 ms … 143.6 ms 23 runs + Time (mean ± σ): 140.5 ms ± 20.4 ms [User: 648.5 ms, System: 24.9 ms] + Range (min … max): 72.7 ms … 175.7 ms 38 runs Benchmark #2: optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png - Time (mean ± σ): 995.7 ms ± 8.0 ms [User: 993.6 ms, System: 1.7 ms] - Range (min … max): 987.5 ms … 1012.8 ms 10 runs + Time (mean ± σ): 743.3 ms ± 21.3 ms [User: 741.7 ms, System: 1.8 ms] + Range (min … max): 718.8 ms … 769.6 ms 10 runs Summary './target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran - 7.57 ± 0.35 times faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' + 5.29 ± 0.78 times faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' ``` diff --git a/README.template.md b/README.template.md index e7a85cfa..794d585c 100644 --- a/README.template.md +++ b/README.template.md @@ -30,7 +30,7 @@ cargo build --release cp target/release/oxipng /usr/local/bin ``` -The current minimum supported Rust version is **1.47.0**. +The current minimum supported Rust version is **1.45.0**. Oxipng follows Semantic Versioning. diff --git a/build.rs b/build.rs index 76ec2dc5..59e2cbba 100644 --- a/build.rs +++ b/build.rs @@ -3,7 +3,7 @@ use std::process::exit; fn main() { // This should match the version in Github Actions scripts and the Readme - const REQUIRED_VERSION: &str = "1.41.0"; + const REQUIRED_VERSION: &str = "1.45.0"; if version().unwrap() < Version::parse(REQUIRED_VERSION).unwrap() { eprintln!("oxipng requires rustc >= {}.", REQUIRED_VERSION); exit(1);