You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switch to zlib-rs by default and drop other zlib backends
As of zlib-rs 0.5.0 (depended on by flate2 1.1.1), zlib-rs no longer
exports C symbols by default, so it doesn't conflict with any other zlib
that might be loaded into the address space.
This removed the primary issue that made zlib selection a challenge
that needed to be exposed to users: users may already have some other
particular preference on zlib implementations, or want to use a system
library, or want to ensure C dependencies use a particular zlib. Since
zlib-rs 0.5.0 no longer conflicts with other zlib implementations, gix
can make this choice independently and not create issues for the user.
Given that, use zlib-rs by default, for performance out of the box with
no C compiler requirement, and deprecate all the feature flags for other
variations. A future major version bump can drop all of these features.
This also means that (for instance) max-performance becomes the same as
max-performance-safe, so such features are deprecated as well.
Depend on flate2 with `default-features = false`, which brings us closer
to eliminating the `miniz_oxide` dependency, which will improve build
time for everyone. Currently, the `gix-archive` dependency on `zip`
still activates the `zip/deflate` feature which enables
`flate2/rust_backend`; this can be fixed to use `deflate-flate2` as soon
as zip-rs/zip2#340 is fixed upstream.
Fixes: #1961
Copy file name to clipboardExpand all lines: Cargo.toml
+12-28
Original file line number
Diff line number
Diff line change
@@ -41,14 +41,15 @@ max = ["max-control", "fast", "gitoxide-core-tools-query", "gitoxide-core-tools-
41
41
42
42
## Like `max`, but only Rust is allowed.
43
43
##
44
-
## This is the most compatible build as it won't need a C compiler or C toolchains to build. It's also not the fastest as or the most feature-rich in terms of available
45
-
## transports as it uses Rust's HTTP implementation.
44
+
## This is the most compatible build as it won't need a C compiler or C toolchains to build. Thanks to zlib-rs, you don't have to trade off between compatibility and performance.
45
+
##
46
+
## This uses Rust's HTTP implementation.
46
47
##
47
48
## As fast as possible, with TUI progress, progress line rendering with auto-configuration, all transports available but less mature pure Rust HTTP implementation, all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs.
#! ZIP might not compile on all platforms, so it depends on the end-user who compiles the application to chose these based on their needs.
221
221
222
222
## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained
223
-
## control over performance features like which `zlib*` implementation to use.
## Activate features that maximize performance, like usage of threads, `and access to caching in object databases, skipping the ones known to cause compile failures
228
-
## on some platforms.
229
-
## Note that this configuration still uses a pure Rust zlib implementation which isn't the fastest compared to its C-alternatives.
230
-
## No C toolchain is involved.
227
+
## Deprecated: gix always uses zlib-rs, so this is equivalent to `max-performance`
231
228
max-performance-safe = ["max-control"]
232
229
233
230
## The tempfile registry uses a better implementation of a thread-safe hashmap, relying on an external crate.
0 commit comments