Cargo Features

gix-features has no features set by default.

[dependencies]
gix-features = { version = "0.39.1", features = ["progress", "progress-unit-human-numbers", "progress-unit-bytes", "fs-walkdir-parallel", "fs-read-dir", "tracing", "tracing-detail", "parallel", "once_cell", "walkdir", "io-pipe", "crc32", "zlib", "zlib-ng", "zlib-ng-compat", "zlib-stock", "zlib-rust-backend", "fast-sha1", "rustsha1", "cache-efficiency-debug", "document-features"] }
progress = prodash

Provide traits and utilities for providing progress information. These can then be rendered using facilities of the prodash crate.

Affects gix-features::progress, hash::bytes_of_file, hash::bytes, hash::bytes_with_hasher

progress-unit-human-numbers

Provide human-readable numbers as well as easier to read byte units for progress bars.

Enables unit-human of optional prodash

progress

Affects progress::count_with_decimals

progress-unit-bytes

Provide human readable byte units for progress bars.

Enables bytesize, unit-bytes of optional prodash

Affects progress::bytes

fs-walkdir-parallel

If set, walkdir iterators will be multi-threaded.

Enables gix-utils and jwalk

gix-utils:

for walkdir

Affects fs::walkdir

fs-read-dir

Provide utilities suitable for working with the std::fs::read_dir().

Enables gix-utils

tracing

Implement tracing with tracing-core, which provides applications with valuable performance details if they opt-in to it.

Note that this may have overhead as well, thus instrumentations should be used stategically, only providing coarse tracing by default and adding details only where needed while marking them with the appropriate level.

Enables tracing of gix-trace

tracing-detail

If enabled, detailed tracing is also emitted, which can greatly increase insights but at a cost.

Enables tracing-detail of gix-trace

parallel

Use scoped threads and channels to parallelize common workloads on multiple objects. If enabled, it is used everywhere where it makes sense. As caches are likely to be used and instantiated per thread, more memory will be used on top of the costs for threads. The threading module will contain thread-safe primitives for shared ownership and mutation, otherwise these will be their single threaded counterparts. This way, single-threaded applications don't have to pay for threaded primitives.

Enables crossbeam-channel and parking_lot

crossbeam-channel:

'parallel' feature

Affects parallel::optimize_chunk_size_and_thread_limit, parallel::num_threads, parallel::in_parallel_if

once_cell

If enabled, OnceCell will be made available for interior mutability either in sync or unsync forms.

Enables once_cell

walkdir

Makes facilities of the walkdir crate partially available. In conjunction with the parallel feature, directory walking will be parallel instead behind a compatible interface.

Enables gix-utils and walkdir

walkdir:

used when parallel is off

Affects fs::walkdir

io-pipe
  • an in-memory unidirectional pipe using bytes as efficient transfer mechanism.

Enables bytes

pipe

Affects io::pipe, gix-features::io

crc32

provide a proven and fast crc32 implementation.

Enables crc32fast

Affects hash::crc32_update, hash::crc32

zlib zlib-ng? zlib-ng-compat? zlib-rust-backend? zlib-stock?

Mutually Exclusive ZLIB

Enable the usage of zlib related utilities to compress or decompress data. The base zlib feature uses the flate2 Rust crate; the other mutually exclusive features select the flate2 backend. Note that a competitive Zlib implementation is critical to gitoxide's` object database performance. Enabling this without enabling one of the other features below will use a low-performance pure-Rust backend.

Enables thiserror and rust_backend of flate2

zlib module

Affects gix-features::zlib

zlib-ng = zlib

Use the C-based zlib-ng backend, which can compress and decompress significantly faster.

Enables zlib-ng of optional flate2

zlib-ng-compat = zlib

Use zlib-ng via its zlib-compat API. Useful if you already need zlib for C code elsewhere in your dependencies. Otherwise, use zlib-ng.

Enables zlib-ng-compat of optional flate2

zlib-stock = zlib

Use a slower C-based backend which can compress and decompress significantly faster than the rust version. Unlike zlib-ng-compat, this allows using dynamic linking with system zlib libraries and doesn't require cmake.

Enables zlib of optional flate2

zlib-rust-backend = zlib

Pure Rust backend, available for completeness even though it's the default if neither of the above options are set. Low performance, but pure Rust, so it may build in environments where other backends don't.

Enables rust_backend of optional flate2

fast-sha1

Mutually Exclusive SHA1

A fast SHA1 implementation is critical to gitoxide's object database performance A multi-crate implementation that can use hardware acceleration, thus bearing the potential for up to 2Gb/s throughput on CPUs that support it, like AMD Ryzen or Intel Core i3, as well as Apple Silicon like M1. Takes precedence over rustsha1 if both are specified.

Enables sha1

Affects hash::Digest, hash::hasher, hash::bytes_of_file, hash::bytes, hash::bytes_with_hasher

rustsha1

A standard and well performing pure Rust implementation of Sha1. Will significantly slow down various git operations.

Enables sha1_smol

hashing and 'fast-sha1' feature

Affects hash::Digest, hash::hasher, hash::bytes_of_file, hash::bytes, hash::bytes_with_hasher

cache-efficiency-debug

Other

Count cache hits and misses and print that debug information on drop. Caches implement this by default, which costs nothing unless this feature is enabled

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

prodash progress?
document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml