149 lines · 6.3 KB · TOML
RawDownload
[package]name = "git-features"description = "A crate to integrate various capabilities using compile-time feature flags"repository = "https://github.com/Byron/gitoxide"version = "0.22.5"authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]license = "MIT/Apache-2.0"edition = "2018" [lib]doctest = falsetest = false [features] default = []## Provide traits and utilities for providing progress information. These can then be rendered## using facilities of the `prodash` crate.progress = ["prodash"] ## If set, and with the `parallel` feature set, walkdir iterators will be single-threaded.## This feature exists to avoid [certain side-effects](https://github.com/starship/starship/issues/4251) of rayon threadpool configuration with `jwalk`.fs-walkdir-single-threaded = [] ## 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.parallel = ["crossbeam-utils", "crossbeam-channel", "num_cpus", "jwalk", "parking_lot"]#* an in-memory unidirectional pipe using `bytes` as efficient transfer mechanism.io-pipe = ["bytes"]## provide a proven and fast `crc32` implementation.crc32 = ["crc32fast"] #! ### 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.zlib = ["flate2", "flate2/rust_backend", "quick-error"]## Use zlib-ng (libz-ng-sys) with native API (no compat mode) that can co-exist with system libz.zlib-ng= ["flate2/zlib-ng"]## Use a C-based backend which can compress and decompress significantly faster than the other options.zlib-ng-compat = ["flate2/zlib-ng-compat"]## 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.zlib-stock = ["flate2/zlib"]## available for completeness even though it's the default - it may be chosen for more specific feature flag names, instead of a bare `zlib`.zlib-rust-backend = ["flate2/rust_backend"] #! ### 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.fast-sha1 = ["sha1"]## A standard and well performing pure Rust implementation of Sha1. Will significantly slow down various git operations.rustsha1 = ["sha1_smol"] #! ### 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 enabledcache-efficiency-debug = [] [[test]]name = "hash"path = "tests/hash.rs"required-features = ["sha1_smol"] [[test]]name = "parallel"path = "tests/parallel_threaded.rs"required-features = ["parallel", "sha1_smol"] [[test]]name = "multi-threaded"path = "tests/parallel_shared_threaded.rs"required-features = ["parallel", "sha1_smol"] [[test]]name = "single-threaded"path = "tests/parallel_shared.rs"required-features = ["sha1_smol"] [[test]]name = "pipe"path = "tests/pipe.rs"required-features = ["io-pipe"] [dependencies]#! ### Optional Dependencies git-hash = { version = "^0.9.10", path = "../git-hash" }   # 'parallel' featurecrossbeam-utils = { version = "0.8.7", optional = true }crossbeam-channel = { version = "0.5.0", optional = true }num_cpus = { version = "1.13.0", optional = true }parking_lot = { version = "0.12.0", default-features = false, optional = true } jwalk = { version = "0.6.0", optional = true }## Makes facilities of the `walkdir` crate partially available.## In conjunction with the **parallel** feature, directory walking will be parallel instead behind a compatible interface.walkdir = { version = "2.3.2", optional = true } # used when parallel is off # hashing and 'fast-sha1' featuresha1_smol = { version = "1.0.0", optional = true }crc32fast = { version = "1.2.1", optional = true }sha1 = { version = "0.10.0", optional = true } # progressprodash = { version = "20.2.0", optional = true, default-features = false, features = ["unit-bytes", "unit-human"] } # pipebytes = { version = "1.0.0", optional = true } # zlib moduleflate2 = { version = "1.0.17", optional = true, default-features = false }quick-error = { version = "2.0.0", optional = true } ## If enabled, OnceCell will be made available for interior mutability either in sync or unsync forms.once_cell = { version = "1.13.0", optional = true } document-features = { version = "0.2.0", optional = true } [target.'cfg(unix)'.dependencies]## for fs::open_options_no_follow()# TODO: ideally we conditionally import it only if a plumbing crate wants to use the underlying feature. Wanted to avoid to add to feature-toggle complexity.libc = { version = "0.2.119" } [dev-dependencies]bstr = { version = "0.2.15", default-features = false }  # Assembly doesn't yet compile on MSVC on windows, but does on GNU, see https://github.com/RustCrypto/asm-hashes/issues/17# At this time, only aarch64, x86 and x86_64 are supported.[target.'cfg(all(any(target_arch = "aarch64", target_arch = "x86", target_arch = "x86_64"), not(target_env = "msvc")))'.dependencies]sha1 = { version = "0.10.0", optional = true, features = ["asm"] } [package.metadata.docs.rs]all-features = truefeatures = ["document-features"]rustdoc-args = ["--cfg", "docsrs"]