Skip to content

Commit

Permalink
feat: max-performance-zlib-ng-compat flag
Browse files Browse the repository at this point in the history
This allows users to use zlib-ng-compat without having to add a dependency on gix-features, and without having to keep track of which options max-performance depends on other than max-performance-safe.

Essentially it's for use in projects that also include `zlib` in their builds, which would fail to build with `max-performance`, but who otherwise don't need `max-performance-safe`.

Co-authored-by: Josh Triplett <[email protected]>
  • Loading branch information
Byron and joshtriplett authored Jan 12, 2024
2 parents 79fd006 + cfb06ec commit 1ba9488
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"]
## Note that some platforms might suffer from compile failures, which is when `max-performance-safe` should be used.
max-performance = [ "max-performance-safe", "gix-features/zlib-ng", "fast-sha1" ]

## Activate other features that maximize performance, like usage of threads, `zlib-ng-compat`, and access to caching in object databases.
## Note that some platforms might suffer from compile failures, which is when `max-performance-safe` should be used.
## Unlike `max-performance`, `max-performance-zlib-ng-compat` uses zlib-ng via
## libz-sys in zlib-ng-compat mode, which is useful when building with other
## software that needs zlib, or to avoid linking conflicts when using other
## software that uses zlib-ng-compat.
max-performance-zlib-ng-compat = [ "max-performance-safe", "gix-features/zlib-ng-compat", "fast-sha1" ]

## If enabled, use assembly versions of sha1 on supported platforms.
## This might cause compile failures as well which is why it can be turned off separately.
fast-sha1 = [ "gix-features/fast-sha1" ]
Expand Down

0 comments on commit 1ba9488

Please sign in to comment.