Skip to content

Commit

Permalink
Attempt to enable zlib-ng on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
charliermarsh committed Jan 7, 2025
1 parent c8b3e85 commit d9ce6fc
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 18 deletions.
67 changes: 55 additions & 12 deletions crates/uv-performance-flate2-backend/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 7 additions & 6 deletions crates/uv-performance-flate2-backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ edition = "2021"
[lib]
doctest = false

# Use `zlib-ng` on x86_64 targets, apart from FreeBSD.
[target.'cfg(all(target_arch = "x86_64", not(target_os = "freebsd")))'.dependencies]
# Use `zlib-rs` everywhere else.
[target.'cfg(any(target_os = "freebsd"))'.dependencies]
flate2 = { version = "1.0.28", default-features = false, features = ["zlib-rs"] }

# Use `zlib-ng` on all supported platforms.
[target.'cfg(not(any(target_os = "freebsd")))'.dependencies]
flate2 = { version = "1.0.28", default-features = false, features = ["zlib-ng"] }
# See: https://github.com/rust-lang/libz-sys/issues/225
libz-ng-sys = { version = "<1.1.20" }
libz-ng-sys = { version = "=1.1.16" }

# Use `zlib-rs` everywhere else.
[target.'cfg(not(all(target_arch = "x86_64", not(target_os = "freebsd"))))'.dependencies]
flate2 = { version = "1.0.28", default-features = false, features = ["zlib-rs"] }

0 comments on commit d9ce6fc

Please sign in to comment.