Cargo Features

git-features has no features set by default.

[dependencies]
git-features = { version = "0.26.5", features = ["progress", "fs-walkdir-parallel", "parallel", "io-pipe", "crc32", "zlib", "zlib-ng", "zlib-ng-compat", "zlib-stock", "zlib-rust-backend", "fast-sha1", "rustsha1", "cache-efficiency-debug", "walkdir", "once_cell", "document-features"] }
progress = prodash

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

Affects git-features::progress, hash::bytes_of_file, hash::bytes

fs-walkdir-parallel = jwalk, num_cpus

If set, walkdir iterators will be multi-threaded.

Affects fs::walkdir

parallel = crossbeam-channel, crossbeam-utils, num_cpus, parking_lot

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.

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

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

Affects io::pipe, git-features::io

crc32 = crc32fast

provide a proven and fast crc32 implementation.

Affects hash::crc32_update, hash::crc32

zlib = flate2, quick-error

Mutually Exclusive ZLIB

Enable the usage of zlib related utilities to compress or decompress data. By default it uses a pure rust implementation which is slower than the zlib-ng-compat or zlib-stock versions, but might be relevant if you prefer a pure-rust build and reduced performance is acceptable. zlib-stock can be used if dynamic linking of an external zlib library is desired or if cmake is not available. Note that a competitive Zlib implementation is critical to gitoxide's object database performance. Additional backends are supported, each of which overriding the default Rust backend.

Enables rust_backend of flate2

zlib module

Affects git-features::zlib

zlib-ng

Use zlib-ng (libz-ng-sys) with native API (no compat mode) that can co-exist with system libz.

Enables zlib-ng of flate2

zlib-ng-compat

Use a C-based backend which can compress and decompress significantly faster than the other options.

Enables zlib-ng-compat of flate2

zlib-stock

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 flate2

zlib-rust-backend

available for completeness even though it's the default - it may be chosen for more specific feature flag names, instead of a bare zlib.

Enables rust_backend of flate2

fast-sha1 = 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.

Affects hash::Sha1Digest, hash::hasher, hash::bytes_of_file, hash::bytes

rustsha1 = sha1_smol

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

Affects hash::Sha1Digest, hash::hasher, hash::bytes_of_file, hash::bytes

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.

crossbeam-utils parallel?

Enables crossbeam-utils

'parallel' feature

crossbeam-channel parallel?
num_cpus fs-walkdir-parallel? parallel?
parking_lot parallel?
jwalk fs-walkdir-parallel?
walkdir implicit feature

Enables 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. used when parallel is off

Affects fs::walkdir

sha1_smol rustsha1?

Enables sha1_smol

hashing and 'fast-sha1' feature

crc32fast crc32?
sha1 fast-sha1?
prodash progress?

Enables prodash ^23.0

progress

bytes io-pipe?

Enables bytes

pipe

flate2 zlib? zlib-ng? zlib-ng-compat? zlib-rust-backend? zlib-stock?
quick-error zlib?
once_cell implicit feature

Enables once_cell

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

document-features implicit feature

Enables document-features

document-features:

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