From d99d8441523578e2d4b0e61196ce82fa15fd72b0 Mon Sep 17 00:00:00 2001 From: Ed Morley Date: Fri, 2 Oct 2026 14:16:30 +0100 Subject: [PATCH] Enable `flate2`'s `runtime_detection` feature As of `flate2` 1.1.10, runtime CPU feature detection (and so SIMD acceleration) in `zlib-rs` is gated behind the new `runtime_detection` default feature, which is disabled by our use of `default-features = false`, so has to be enabled explicitly. The `flate2` docs don't currently mention this, see: https://github.com/rust-lang/flate2-rs/issues/570 GUS-W-24154015. --- CHANGELOG.md | 4 ++++ Cargo.lock | 10 ++++++++++ Cargo.toml | 2 +- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5ec7a7..74f2fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Updated libcnb to 0.32.0, which includes OpenTelemetry crate upgrades. ([#629](https://github.com/heroku/buildpacks-python/pull/629)) +### Fixed + +- Restored SIMD-accelerated decompression of the uv download. ([#628](https://github.com/heroku/buildpacks-python/pull/628)) + ## [6.7.0] - 2026-10-02 ### Changed diff --git a/Cargo.lock b/Cargo.lock index 535eeaa..12406d9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -144,6 +144,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a7799fd6b852db0e61728dde9a204c423b44d689dbd432522543614b490e78" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-deque" version = "0.8.8" @@ -247,6 +256,7 @@ version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb" dependencies = [ + "crc32fast", "zlib-rs", ] diff --git a/Cargo.toml b/Cargo.toml index a0f594a..b9cae74 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ result_large_err = "allow" # We use the `zlib-rs` backend, since it's the fastest: # https://github.com/rust-lang/flate2-rs#backends # https://trifectatech.org/blog/zlib-rs-is-faster-than-c/ -flate2 = { version = "1", default-features = false, features = ["zlib-rs"] } +flate2 = { version = "1", default-features = false, features = ["zlib-rs", "runtime_detection"] } indoc = "2" libcnb = { version = "=0.32.0", features = ["trace"] } libherokubuildpack = { version = "=0.32.0", default-features = false, features = ["log"] }