lints.workspace = true [package]name = "gix"repository = "https://github.com/GitoxideLabs/gitoxide"description = "Interact with git repositories just like git would"license = "MIT OR Apache-2.0"version = "0.85.0"authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]edition = "2024"include = ["/src/**/*", "/LICENSE-*"]# Rust 1.85 is required so hash-related dependencies can use Rust 2024 crates,# notably `sha2` 0.11 and `hashbrown` 0.17.rust-version = "1.85" [lib]doctest = truetest = true [[example]]name = "clone"path = "examples/clone.rs"required-features = ["blocking-network-client"] [features] default = ["max-performance-safe", "comfort", "basic", "extras", "auto-chain-error", "sha1"] #! There are various categories of features which help to optimize performance and build times. `gix` comes with 'batteries included' and everything is#! enabled as long as it doesn't sacrifice compatibility. Most users will be fine with that but will pay with higher compile times than necessary as they#! probably don't use all of these features.#!#! **Thus it's recommended to take a moment and optimize build times by choosing only those 'Components' that you require.** *'Performance' relevant features should#! be chosen next to maximize efficiency.*#!#! #### Application Developers#!#! These are considered the end-users, all they need to tune is `Performance` features to optimize the efficiency of their app, assuming they don't use `gix`#! directly. Otherwise, see the `Library Developers` paragraph.#!#! In order to configure a crate that isn't a direct dependency, one has to make it a direct dependency. We recommend#! `gix-for-configuration = { package = "gix", version = "X.Y.Z", features = […] }` to make clear this dependency isn't used in code.#!#! #### Library Developers#!#! As a developer of a library, you should start out with `gix = { version = "X.Y.Z", default-features = false }` and add components as you see fit.#! For best compatibility, **do not activate `max-performance-safe`** or any other performance options.#!#! #### Bundles#!#! A bundle is a set of related feature toggles which can be activated with a single name that acts as a group.#! Bundles are for convenience only and bear no further meaning beyond the cargo manifest file. ## More fundamental components that most will be able to make good use of.basic = ["blob-diff", "revision", "index"] ## Various additional features and capabilities that are not necessarily part of what most users would need.extras = [ "worktree-stream", "worktree-archive", "revparse-regex", "mailmap", "excludes", "attributes", "worktree-mutation", "credentials", "interrupt", "status", "dirwalk", "blame"] ## A collection of features that need a larger MSRV, and thus are disabled by default.## * `blob-merge` should be in extras, but needs `tree-editor` for convenience.need-more-recent-msrv = ["merge", "tree-editor"] ## Various progress-related features that improve the look of progress message units.comfort = [ "gix-features/progress-unit-bytes", "gix-features/progress-unit-human-numbers",] #! #### Hashes#!#! Support for various hash algorithms is controlled here. The idea is to allow applications to#! compile in only the ones they need, which is why within the entire `gix` stack there is no#! crate that sets an algorithm, except for the top-level `gix` crate for convenience.#!#! At least one hash algorithm must be enabled for compilation to succeed. ## Enable support for the SHA-1 hash throughout the `gix` stack.sha1 = [ "gix-hash/sha1", "gix-pack/sha1", "gix-worktree-stream?/sha1",] ## Enable support for the SHA-256 hash throughout the `gix` stack.sha256 = [ "gix-hash/sha256", "gix-pack/sha256", "gix-worktree-stream?/sha256",] #! #### Components#!#! A component is a distinct feature which may be comprised of one or more methods around a particular topic.#! Providers of libraries should only activate the components they need. ## Provide a top-level `command` module that helps with spawning commands similarly to `git`.command = ["dep:gix-command"] ## Obtain information similar to `git status`.status = ["gix-status", "dirwalk", "index", "blob-diff", "gix-diff/index"] ## Utilities for interrupting computations and cleaning up tempfiles.interrupt = ["dep:signal-hook", "gix-tempfile/signals", "dep:parking_lot"] ## Access to `.git/index` files.index = ["dep:gix-index"] ## Support directory walks with Git-style annoations.dirwalk = ["dep:gix-dir", "attributes", "excludes"] ## Access to credential helpers, which provide credentials for URLs.# Note that `gix-negotiate` just piggibacks here, as 'credentials' is equivalent to 'fetch & push' right now.credentials = ["dep:gix-credentials", "dep:gix-prompt", "dep:gix-negotiate"] ## Various ways to alter the worktree makeup by checkout and reset.worktree-mutation = ["attributes", "dep:gix-worktree-state"] ## Retrieve a worktree stack for querying exclude informationexcludes = ["dep:gix-ignore", "dep:gix-worktree", "index"] ## Provide facilities to edit trees conveniently.#### Not that currently, this requires [Rust 1.75](https://caniuse.rs/features/return_position_impl_trait_in_trait).## This feature toggle is likely going away then.tree-editor = [] ## Query attributes and excludes. Enables access to pathspecs, worktree checkouts, filter-pipelines and submodules.attributes = [ "excludes", "dep:gix-filter", "dep:gix-pathspec", "dep:gix-attributes", "dep:gix-submodule", "gix-worktree?/attributes", "command",] ## Add support for mailmaps, as way of determining the final name of commmiters and authors.mailmap = ["dep:gix-mailmap", "revision"] ## Make revspec parsing possible, as well describing revision.revision = ["gix-revision/describe", "gix-revision/merge_base", "index"] ## If enabled, revspecs now support the regex syntax like `@^{/^.*x}`. Otherwise, only substring search is supported.## This feature does increase compile time for niche-benefit, but is required for fully git-compatible revspec parsing.revparse-regex = ["regex", "revision"] ## Make it possible to diff blobs line by line. Note that this feature is integral for implementing tree-diffs as well due to the handling of rename-tracking,## which relies on line-by-line diffs in some cases.blob-diff = ["gix-diff/blob", "attributes"] ## Add functions to specifically merge files, using the standard three-way merge that git offers.merge = ["tree-editor", "blob-diff", "dep:gix-merge", "attributes"] ## Add blame command similar to `git blame`.blame = ["dep:gix-blame", "blob-diff"] ## Make it possible to turn a tree into a stream of bytes, which can be decoded to entries and turned into various other formats.worktree-stream = ["gix-worktree-stream", "attributes"] ## Create archives from a tree in the repository, similar to what `git archive` does.#### Note that we disable all default features which strips it off all container support, like `tar` and `zip`.## Your application should add it as dependency and re-activate the desired features.worktree-archive = ["gix-archive", "worktree-stream", "attributes"] #! #### Mutually Exclusive Network Client#!#! Either `async-*` or `blocking-*` versions of these toggles may be enabled at a time.#! For this reason, these must be chosen by the user of the library and can't be pre-selected.#! Making a choice here also affects which crypto-library ends up being used. ## Make `gix-protocol` available along with an async client.async-network-client = [ "gix-protocol/async-client", "gix-pack/streaming-input", "dep:gix-transport", "attributes", "credentials",]## Use this if your crate uses `async-std` as runtime, and enable basic runtime integration when connecting to remote servers via the `git://` protocol.async-network-client-async-std = [ "async-std", "async-network-client", "gix-transport/async-std",]## Make `gix-protocol` available along with a blocking client, providing access to the `file://`, `git://` and `ssh://` transports.blocking-network-client = [ "gix-protocol/blocking-client", "gix-pack/streaming-input", "dep:gix-transport", "attributes", "credentials",]## Stacks with `blocking-network-client` to provide support for HTTP/S using **curl**, and implies blocking networking as a whole, making the `https://` transport available.blocking-http-transport-curl = [ "blocking-network-client", "gix-transport/http-client-curl",]## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`.## This feature takes precedence over `http-client-curl-rust-ssl`.blocking-http-transport-curl-rustls = [ "blocking-http-transport-curl", "gix-transport/http-client-curl-rust-tls",]## Stacks with `blocking-http-transport-curl` and also enables the `openssl` backend.blocking-http-transport-curl-openssl = [ "blocking-http-transport-curl", "gix-transport/http-client-curl-openssl",]## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport available.## Note that `reqwest`'s default features are not enabled, allowing custom configuration of e.g. the TLS backend by adding it as explicit dependency.blocking-http-transport-reqwest = [ "blocking-network-client", "gix-transport/http-client-reqwest",]## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.blocking-http-transport-reqwest-rust-tls = [ "blocking-http-transport-reqwest", "gix-transport/http-client-reqwest-rust-tls",]## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.## This also makes use of `trust-dns` to avoid `getaddrinfo`, but note it comes with its own problems.blocking-http-transport-reqwest-rust-tls-trust-dns = [ "blocking-http-transport-reqwest", "gix-transport/http-client-reqwest-rust-tls-trust-dns",]## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `native-tls` crate.blocking-http-transport-reqwest-native-tls = [ "blocking-http-transport-reqwest", "gix-transport/http-client-reqwest-native-tls",] #! #### Performance#!#! The reason these features exist is to allow optimization for compile time and optimize for compatibility by default. This means that some performance options around#! 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. ## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained## control.## No C toolchain is involved.max-control = ["parallel", "pack-cache-lru-static", "pack-cache-lru-dynamic"] ## Deprecated: gix always uses zlib-rs, so this is equivalent to `max-performance`max-performance-safe = ["max-control"] ## The tempfile registry uses a better implementation of a thread-safe hashmap, relying on an external crate.## This may be useful when tempfiles are created and accessed in a massively parallel fashion and you know that this is indeed faster than## the simpler implementation that is the default.hp-tempfile-registry = ["gix-tempfile/hp-hashmap"] ## Make certain data structure threadsafe (or `Sync`) to facilitate multithreading. Further, many algorithms will now use multiple threads by default.#### If unset, most of `gix` can only be used in a single thread as data structures won't be `Send` anymore.parallel = [ "gix-features/parallel", "gix-attributes?/parallel", "gix-filter?/parallel", "gix-pathspec?/parallel", "gix-worktree?/parallel",] ## Provide a fixed-size allocation-free LRU cache for packs. It's useful if caching is desired while keeping the memory footprint## for the LRU-cache itself low.pack-cache-lru-static = ["gix-pack/pack-cache-lru-static"] ## Provide a hash-map based LRU cache whose eviction is based a memory cap calculated from object data.pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"] ## Enable all features required for performance.max-performance = ["max-performance-safe"] #! #### Other#!#! The catch-all of feature toggles. ## All [`gix::Error`](crate::Error) will produce error chains, which makes them work as expected in conjunction with `anyhow`.auto-chain-error = ["gix-error/auto-chain-error"] ## The opposite of `auto-chain-error`. Use it to override `auto-chain-error`.tree-error = ["gix-error/tree-error"] ## Enable tracing using the `tracing` crate for coarse tracing.tracing = ["gix-features/tracing"] ## Enable tracing using the `tracing` crate for detailed tracing. Also enables coarse tracing.tracing-detail = ["gix-features/tracing-detail", "tracing"] ## Data structures implement `serde::Serialize` and `serde::Deserialize`.serde = [ "dep:serde", "gix-pack/serde", "gix-object/serde", "gix-protocol/serde", "gix-transport?/serde", "gix-ref/serde", "gix-odb/serde", "gix-index?/serde", "gix-mailmap?/serde", "gix-url/serde", "gix-attributes?/serde", "gix-ignore?/serde", "gix-revision/serde", "gix-worktree?/serde", "gix-commitgraph/serde", "gix-credentials?/serde",] ## Re-export the progress tree root which allows to obtain progress from various functions which take `impl gix::Progress`.## Applications which want to display progress will probably need this implementation.progress-tree = ["prodash/progress-tree"] ## Print debugging information about usage of object database caches, useful for tuning cache sizes.cache-efficiency-debug = ["gix-features/cache-efficiency-debug"] [dependencies]gix-error = { version = "^0.2.5", path = "../gix-error" }gix-utils = { version = "^0.3.4", path = "../gix-utils", features = ["bstr"] }gix-fs = { version = "^0.21.2", path = "../gix-fs" }gix-ref = { version = "^0.65.0", path = "../gix-ref" }gix-discover = { version = "^0.53.0", path = "../gix-discover" }gix-tempfile = { version = "^23.0.0", path = "../gix-tempfile", default-features = false }gix-lock = { version = "^23.0.0", path = "../gix-lock" }gix-validate = { version = "^0.11.2", path = "../gix-validate" }gix-sec = { version = "^0.14.1", path = "../gix-sec" }gix-date = { version = "^0.15.6", path = "../gix-date" }gix-refspec = { version = "^0.43.0", path = "../gix-refspec" }gix-filter = { version = "^0.32.0", path = "../gix-filter", optional = true }gix-dir = { version = "^0.27.0", path = "../gix-dir", optional = true } gix-config = { version = "^0.58.0", path = "../gix-config" }gix-odb = { version = "^0.82.0", path = "../gix-odb" }gix-zlib = { version = "^0.1.0", path = "../gix-zlib" }gix-hash = { version = "^0.25.1", path = "../gix-hash" }gix-shallow = { version = "^0.12.1", path = "../gix-shallow" }gix-object = { version = "^0.62.0", path = "../gix-object" }gix-actor = { version = "^0.41.1", path = "../gix-actor" }gix-pack = { version = "^0.72.0", path = "../gix-pack", default-features = false, features = [ "object-cache-dynamic",] }gix-revision = { version = "^0.47.0", path = "../gix-revision", default-features = false }gix-revwalk = { version = "^0.33.0", path = "../gix-revwalk" }gix-negotiate = { version = "^0.33.0", path = "../gix-negotiate", optional = true } gix-path = { version = "^0.12.2", path = "../gix-path" }gix-url = { version = "^0.36.2", path = "../gix-url" }gix-traverse = { version = "^0.59.0", path = "../gix-traverse" }gix-diff = { version = "^0.65.0", path = "../gix-diff", default-features = false }gix-merge = { version = "^0.18.0", path = "../gix-merge", default-features = false, optional = true }gix-mailmap = { version = "^0.33.1", path = "../gix-mailmap", optional = true }gix-features = { version = "^0.48.1", path = "../gix-features", features = [ "progress", "once_cell",] }gix-trace = { version = "^0.1.20", path = "../gix-trace" } gix-glob = { version = "^0.26.1", path = "../gix-glob" }gix-credentials = { version = "^0.38.2", path = "../gix-credentials", optional = true }gix-prompt = { version = "^0.15.1", path = "../gix-prompt", optional = true }gix-index = { version = "^0.53.0", path = "../gix-index", optional = true }gix-attributes = { version = "^0.33.2", path = "../gix-attributes", optional = true }gix-ignore = { version = "^0.21.1", path = "../gix-ignore", optional = true }gix-worktree = { version = "^0.54.0", path = "../gix-worktree", optional = true, default-features = false }gix-worktree-state = { version = "^0.32.0", path = "../gix-worktree-state", optional = true }gix-hashtable = { version = "^0.15.2", path = "../gix-hashtable" }gix-commitgraph = { version = "^0.37.1", path = "../gix-commitgraph" }gix-pathspec = { version = "^0.18.1", path = "../gix-pathspec", optional = true }gix-submodule = { version = "^0.32.0", path = "../gix-submodule", optional = true }gix-status = { version = "^0.32.0", path = "../gix-status", optional = true, features = [ "worktree-rewrites",] }gix-command = { version = "^0.9.1", path = "../gix-command", optional = true } gix-worktree-stream = { version = "^0.34.0", path = "../gix-worktree-stream", optional = true }gix-archive = { version = "^0.34.0", path = "../gix-archive", default-features = false, optional = true }gix-blame = { version = "^0.15.0", path = "../gix-blame", optional = true } # For communication with remotesgix-protocol = { version = "^0.63.0", path = "../gix-protocol" }gix-transport = { version = "^0.57.2", path = "../gix-transport", optional = true } # Just to get the progress-tree featureprodash = { version = "31.0.0", optional = true, features = ["progress-tree"] }signal-hook = { version = "0.4.3", default-features = false, optional = true }thiserror = "2.0.18"nonempty = "0.12.0"serde = { version = "1.0.114", optional = true, default-features = false, features = [ "derive",] }smallvec = "1.15.1"async-std = { version = "1.12.0", optional = true } ## For use in rev-parse, which provides searching commits by running a regex on their message.#### If disabled, the text will be search verbatim in any portion of the commit message, similar to## how a simple unanchored regex of only 'normal' characters would work.regex = { version = "1.12.3", optional = true, default-features = false, features = [ "std",] } # for `interrupt` featureparking_lot = { version = "0.12.4", optional = true } document-features = { version = "0.2.0", optional = true } [dev-dependencies]# For additional features that aren't enabled by default due to MSRVgix = { path = ".", default-features = false, features = [ "need-more-recent-msrv", "tree-error", "sha1", "sha256"] }gix-hash = { version = "^0.25.1", path = "../gix-hash" }pretty_assertions = "1.4.0"gix-testtools = { path = "../tests/tools" }is_ci = "1.1.1"anyhow = "1"walkdir = "2.3.2"serial_test = { version = "3.4.0", default-features = false }async-std = { version = "1.12.0", features = ["attributes"] }termtree = "1.0.0"insta = "1.46.3" [package.metadata.docs.rs]features = [ "sha1", "document-features", "max-performance", "blocking-network-client", "blocking-http-transport-curl", "need-more-recent-msrv", "serde",] [package.metadata.cargo-machete]ignored = [ # Feature forwarding uses `prodash/*` in Cargo feature wiring without direct crate references. "prodash",]
lints.workspace = true
[package]
name = "gix"
repository = "https://github.com/GitoxideLabs/gitoxide"
description = "Interact with git repositories just like git would"
license = "MIT OR Apache-2.0"
version = "0.85.0"
authors = ["Sebastian Thiel <sebastian.thiel@icloud.com>"]
edition = "2024"
include = ["/src/**/*", "/LICENSE-*"]
# Rust 1.85 is required so hash-related dependencies can use Rust 2024 crates,
# notably `sha2` 0.11 and `hashbrown` 0.17.
rust-version = "1.85"
[lib]
doctest = true
test = true
[[example]]
name = "clone"
path = "examples/clone.rs"
required-features = ["blocking-network-client"]
[features]
default = ["max-performance-safe", "comfort", "basic", "extras", "auto-chain-error", "sha1"]
#! There are various categories of features which help to optimize performance and build times. `gix` comes with 'batteries included' and everything is
#! enabled as long as it doesn't sacrifice compatibility. Most users will be fine with that but will pay with higher compile times than necessary as they
#! probably don't use all of these features.
#!
#! **Thus it's recommended to take a moment and optimize build times by choosing only those 'Components' that you require.** *'Performance' relevant features should
#! be chosen next to maximize efficiency.*
#!
#! #### Application Developers
#!
#! These are considered the end-users, all they need to tune is `Performance` features to optimize the efficiency of their app, assuming they don't use `gix`
#! directly. Otherwise, see the `Library Developers` paragraph.
#!
#! In order to configure a crate that isn't a direct dependency, one has to make it a direct dependency. We recommend
#! `gix-for-configuration = { package = "gix", version = "X.Y.Z", features = […] }` to make clear this dependency isn't used in code.
#!
#! #### Library Developers
#!
#! As a developer of a library, you should start out with `gix = { version = "X.Y.Z", default-features = false }` and add components as you see fit.
#! For best compatibility, **do not activate `max-performance-safe`** or any other performance options.
#!
#! #### Bundles
#!
#! A bundle is a set of related feature toggles which can be activated with a single name that acts as a group.
#! Bundles are for convenience only and bear no further meaning beyond the cargo manifest file.
## More fundamental components that most will be able to make good use of.
basic = ["blob-diff", "revision", "index"]
## Various additional features and capabilities that are not necessarily part of what most users would need.
extras = [
"worktree-stream",
"worktree-archive",
"revparse-regex",
"mailmap",
"excludes",
"attributes",
"worktree-mutation",
"credentials",
"interrupt",
"status",
"dirwalk",
"blame"
]
## A collection of features that need a larger MSRV, and thus are disabled by default.
## * `blob-merge` should be in extras, but needs `tree-editor` for convenience.
need-more-recent-msrv = ["merge", "tree-editor"]
## Various progress-related features that improve the look of progress message units.
comfort = [
"gix-features/progress-unit-bytes",
"gix-features/progress-unit-human-numbers",
]
#! #### Hashes
#!
#! Support for various hash algorithms is controlled here. The idea is to allow applications to
#! compile in only the ones they need, which is why within the entire `gix` stack there is no
#! crate that sets an algorithm, except for the top-level `gix` crate for convenience.
#!
#! At least one hash algorithm must be enabled for compilation to succeed.
## Enable support for the SHA-1 hash throughout the `gix` stack.
sha1 = [
"gix-hash/sha1",
"gix-pack/sha1",
"gix-worktree-stream?/sha1",
]
## Enable support for the SHA-256 hash throughout the `gix` stack.
sha256 = [
"gix-hash/sha256",
"gix-pack/sha256",
"gix-worktree-stream?/sha256",
]
#! #### Components
#!
#! A component is a distinct feature which may be comprised of one or more methods around a particular topic.
#! Providers of libraries should only activate the components they need.
## Provide a top-level `command` module that helps with spawning commands similarly to `git`.
command = ["dep:gix-command"]
## Obtain information similar to `git status`.
status = ["gix-status", "dirwalk", "index", "blob-diff", "gix-diff/index"]
## Utilities for interrupting computations and cleaning up tempfiles.
interrupt = ["dep:signal-hook", "gix-tempfile/signals", "dep:parking_lot"]
## Access to `.git/index` files.
index = ["dep:gix-index"]
## Support directory walks with Git-style annoations.
dirwalk = ["dep:gix-dir", "attributes", "excludes"]
## Access to credential helpers, which provide credentials for URLs.
# Note that `gix-negotiate` just piggibacks here, as 'credentials' is equivalent to 'fetch & push' right now.
credentials = ["dep:gix-credentials", "dep:gix-prompt", "dep:gix-negotiate"]
## Various ways to alter the worktree makeup by checkout and reset.
worktree-mutation = ["attributes", "dep:gix-worktree-state"]
## Retrieve a worktree stack for querying exclude information
excludes = ["dep:gix-ignore", "dep:gix-worktree", "index"]
## Provide facilities to edit trees conveniently.
##
## Not that currently, this requires [Rust 1.75](https://caniuse.rs/features/return_position_impl_trait_in_trait).
## This feature toggle is likely going away then.
tree-editor = []
## Query attributes and excludes. Enables access to pathspecs, worktree checkouts, filter-pipelines and submodules.
attributes = [
"excludes",
"dep:gix-filter",
"dep:gix-pathspec",
"dep:gix-attributes",
"dep:gix-submodule",
"gix-worktree?/attributes",
"command",
]
## Add support for mailmaps, as way of determining the final name of commmiters and authors.
mailmap = ["dep:gix-mailmap", "revision"]
## Make revspec parsing possible, as well describing revision.
revision = ["gix-revision/describe", "gix-revision/merge_base", "index"]
## If enabled, revspecs now support the regex syntax like `@^{/^.*x}`. Otherwise, only substring search is supported.
## This feature does increase compile time for niche-benefit, but is required for fully git-compatible revspec parsing.
revparse-regex = ["regex", "revision"]
## Make it possible to diff blobs line by line. Note that this feature is integral for implementing tree-diffs as well due to the handling of rename-tracking,
## which relies on line-by-line diffs in some cases.
blob-diff = ["gix-diff/blob", "attributes"]
## Add functions to specifically merge files, using the standard three-way merge that git offers.
merge = ["tree-editor", "blob-diff", "dep:gix-merge", "attributes"]
## Add blame command similar to `git blame`.
blame = ["dep:gix-blame", "blob-diff"]
## Make it possible to turn a tree into a stream of bytes, which can be decoded to entries and turned into various other formats.
worktree-stream = ["gix-worktree-stream", "attributes"]
## Create archives from a tree in the repository, similar to what `git archive` does.
##
## Note that we disable all default features which strips it off all container support, like `tar` and `zip`.
## Your application should add it as dependency and re-activate the desired features.
worktree-archive = ["gix-archive", "worktree-stream", "attributes"]
#! #### Mutually Exclusive Network Client
#!
#! Either `async-*` or `blocking-*` versions of these toggles may be enabled at a time.
#! For this reason, these must be chosen by the user of the library and can't be pre-selected.
#! Making a choice here also affects which crypto-library ends up being used.
## Make `gix-protocol` available along with an async client.
async-network-client = [
"gix-protocol/async-client",
"gix-pack/streaming-input",
"dep:gix-transport",
"attributes",
"credentials",
]
## Use this if your crate uses `async-std` as runtime, and enable basic runtime integration when connecting to remote servers via the `git://` protocol.
async-network-client-async-std = [
"async-std",
"async-network-client",
"gix-transport/async-std",
]
## Make `gix-protocol` available along with a blocking client, providing access to the `file://`, `git://` and `ssh://` transports.
blocking-network-client = [
"gix-protocol/blocking-client",
"gix-pack/streaming-input",
"dep:gix-transport",
"attributes",
"credentials",
]
## Stacks with `blocking-network-client` to provide support for HTTP/S using **curl**, and implies blocking networking as a whole, making the `https://` transport available.
blocking-http-transport-curl = [
"blocking-network-client",
"gix-transport/http-client-curl",
]
## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`.
## This feature takes precedence over `http-client-curl-rust-ssl`.
blocking-http-transport-curl-rustls = [
"blocking-http-transport-curl",
"gix-transport/http-client-curl-rust-tls",
]
## Stacks with `blocking-http-transport-curl` and also enables the `openssl` backend.
blocking-http-transport-curl-openssl = [
"blocking-http-transport-curl",
"gix-transport/http-client-curl-openssl",
]
## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport available.
## Note that `reqwest`'s default features are not enabled, allowing custom configuration of e.g. the TLS backend by adding it as explicit dependency.
blocking-http-transport-reqwest = [
"blocking-network-client",
"gix-transport/http-client-reqwest",
]
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
blocking-http-transport-reqwest-rust-tls = [
"blocking-http-transport-reqwest",
"gix-transport/http-client-reqwest-rust-tls",
]
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
## This also makes use of `trust-dns` to avoid `getaddrinfo`, but note it comes with its own problems.
blocking-http-transport-reqwest-rust-tls-trust-dns = [
"blocking-http-transport-reqwest",
"gix-transport/http-client-reqwest-rust-tls-trust-dns",
]
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `native-tls` crate.
blocking-http-transport-reqwest-native-tls = [
"blocking-http-transport-reqwest",
"gix-transport/http-client-reqwest-native-tls",
]
#! #### Performance
#!
#! The reason these features exist is to allow optimization for compile time and optimize for compatibility by default. This means that some performance options around
#! 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.
## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained
## control.
## No C toolchain is involved.
max-control = ["parallel", "pack-cache-lru-static", "pack-cache-lru-dynamic"]
## Deprecated: gix always uses zlib-rs, so this is equivalent to `max-performance`
max-performance-safe = ["max-control"]
## The tempfile registry uses a better implementation of a thread-safe hashmap, relying on an external crate.
## This may be useful when tempfiles are created and accessed in a massively parallel fashion and you know that this is indeed faster than
## the simpler implementation that is the default.
hp-tempfile-registry = ["gix-tempfile/hp-hashmap"]
## Make certain data structure threadsafe (or `Sync`) to facilitate multithreading. Further, many algorithms will now use multiple threads by default.
##
## If unset, most of `gix` can only be used in a single thread as data structures won't be `Send` anymore.
parallel = [
"gix-features/parallel",
"gix-attributes?/parallel",
"gix-filter?/parallel",
"gix-pathspec?/parallel",
"gix-worktree?/parallel",
]
## Provide a fixed-size allocation-free LRU cache for packs. It's useful if caching is desired while keeping the memory footprint
## for the LRU-cache itself low.
pack-cache-lru-static = ["gix-pack/pack-cache-lru-static"]
## Provide a hash-map based LRU cache whose eviction is based a memory cap calculated from object data.
pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"]
## Enable all features required for performance.
max-performance = ["max-performance-safe"]
#! #### Other
#!
#! The catch-all of feature toggles.
## All [`gix::Error`](crate::Error) will produce error chains, which makes them work as expected in conjunction with `anyhow`.
auto-chain-error = ["gix-error/auto-chain-error"]
## The opposite of `auto-chain-error`. Use it to override `auto-chain-error`.
tree-error = ["gix-error/tree-error"]
## Enable tracing using the `tracing` crate for coarse tracing.
tracing = ["gix-features/tracing"]
## Enable tracing using the `tracing` crate for detailed tracing. Also enables coarse tracing.
tracing-detail = ["gix-features/tracing-detail", "tracing"]
## Data structures implement `serde::Serialize` and `serde::Deserialize`.
serde = [
"dep:serde",
"gix-pack/serde",
"gix-object/serde",
"gix-protocol/serde",
"gix-transport?/serde",
"gix-ref/serde",
"gix-odb/serde",
"gix-index?/serde",
"gix-mailmap?/serde",
"gix-url/serde",
"gix-attributes?/serde",
"gix-ignore?/serde",
"gix-revision/serde",
"gix-worktree?/serde",
"gix-commitgraph/serde",
"gix-credentials?/serde",
]
## Re-export the progress tree root which allows to obtain progress from various functions which take `impl gix::Progress`.
## Applications which want to display progress will probably need this implementation.
progress-tree = ["prodash/progress-tree"]
## Print debugging information about usage of object database caches, useful for tuning cache sizes.
cache-efficiency-debug = ["gix-features/cache-efficiency-debug"]
[dependencies]
gix-error = { version = "^0.2.5", path = "../gix-error" }
gix-utils = { version = "^0.3.4", path = "../gix-utils", features = ["bstr"] }
gix-fs = { version = "^0.21.2", path = "../gix-fs" }
gix-ref = { version = "^0.65.0", path = "../gix-ref" }
gix-discover = { version = "^0.53.0", path = "../gix-discover" }
gix-tempfile = { version = "^23.0.0", path = "../gix-tempfile", default-features = false }
gix-lock = { version = "^23.0.0", path = "../gix-lock" }
gix-validate = { version = "^0.11.2", path = "../gix-validate" }
gix-sec = { version = "^0.14.1", path = "../gix-sec" }
gix-date = { version = "^0.15.6", path = "../gix-date" }
gix-refspec = { version = "^0.43.0", path = "../gix-refspec" }
gix-filter = { version = "^0.32.0", path = "../gix-filter", optional = true }
gix-dir = { version = "^0.27.0", path = "../gix-dir", optional = true }
gix-config = { version = "^0.58.0", path = "../gix-config" }
gix-odb = { version = "^0.82.0", path = "../gix-odb" }
gix-zlib = { version = "^0.1.0", path = "../gix-zlib" }
gix-hash = { version = "^0.25.1", path = "../gix-hash" }
gix-shallow = { version = "^0.12.1", path = "../gix-shallow" }
gix-object = { version = "^0.62.0", path = "../gix-object" }
gix-actor = { version = "^0.41.1", path = "../gix-actor" }
gix-pack = { version = "^0.72.0", path = "../gix-pack", default-features = false, features = [
"object-cache-dynamic",
] }
gix-revision = { version = "^0.47.0", path = "../gix-revision", default-features = false }
gix-revwalk = { version = "^0.33.0", path = "../gix-revwalk" }
gix-negotiate = { version = "^0.33.0", path = "../gix-negotiate", optional = true }
gix-path = { version = "^0.12.2", path = "../gix-path" }
gix-url = { version = "^0.36.2", path = "../gix-url" }
gix-traverse = { version = "^0.59.0", path = "../gix-traverse" }
gix-diff = { version = "^0.65.0", path = "../gix-diff", default-features = false }
gix-merge = { version = "^0.18.0", path = "../gix-merge", default-features = false, optional = true }
gix-mailmap = { version = "^0.33.1", path = "../gix-mailmap", optional = true }
gix-features = { version = "^0.48.1", path = "../gix-features", features = [
"progress",
"once_cell",
] }
gix-trace = { version = "^0.1.20", path = "../gix-trace" }
gix-glob = { version = "^0.26.1", path = "../gix-glob" }
gix-credentials = { version = "^0.38.2", path = "../gix-credentials", optional = true }
gix-prompt = { version = "^0.15.1", path = "../gix-prompt", optional = true }
gix-index = { version = "^0.53.0", path = "../gix-index", optional = true }
gix-attributes = { version = "^0.33.2", path = "../gix-attributes", optional = true }
gix-ignore = { version = "^0.21.1", path = "../gix-ignore", optional = true }
gix-worktree = { version = "^0.54.0", path = "../gix-worktree", optional = true, default-features = false }
gix-worktree-state = { version = "^0.32.0", path = "../gix-worktree-state", optional = true }
gix-hashtable = { version = "^0.15.2", path = "../gix-hashtable" }
gix-commitgraph = { version = "^0.37.1", path = "../gix-commitgraph" }
gix-pathspec = { version = "^0.18.1", path = "../gix-pathspec", optional = true }
gix-submodule = { version = "^0.32.0", path = "../gix-submodule", optional = true }
gix-status = { version = "^0.32.0", path = "../gix-status", optional = true, features = [
"worktree-rewrites",
] }
gix-command = { version = "^0.9.1", path = "../gix-command", optional = true }
gix-worktree-stream = { version = "^0.34.0", path = "../gix-worktree-stream", optional = true }
gix-archive = { version = "^0.34.0", path = "../gix-archive", default-features = false, optional = true }
gix-blame = { version = "^0.15.0", path = "../gix-blame", optional = true }
# For communication with remotes
gix-protocol = { version = "^0.63.0", path = "../gix-protocol" }
gix-transport = { version = "^0.57.2", path = "../gix-transport", optional = true }
# Just to get the progress-tree feature
prodash = { version = "31.0.0", optional = true, features = ["progress-tree"] }
signal-hook = { version = "0.4.3", default-features = false, optional = true }
thiserror = "2.0.18"
nonempty = "0.12.0"
serde = { version = "1.0.114", optional = true, default-features = false, features = [
"derive",
] }
smallvec = "1.15.1"
async-std = { version = "1.12.0", optional = true }
## For use in rev-parse, which provides searching commits by running a regex on their message.
##
## If disabled, the text will be search verbatim in any portion of the commit message, similar to
## how a simple unanchored regex of only 'normal' characters would work.
regex = { version = "1.12.3", optional = true, default-features = false, features = [
"std",
] }
# for `interrupt` feature
parking_lot = { version = "0.12.4", optional = true }
document-features = { version = "0.2.0", optional = true }
[dev-dependencies]
# For additional features that aren't enabled by default due to MSRV
gix = { path = ".", default-features = false, features = [
"need-more-recent-msrv", "tree-error", "sha1", "sha256"
] }
gix-hash = { version = "^0.25.1", path = "../gix-hash" }
pretty_assertions = "1.4.0"
gix-testtools = { path = "../tests/tools" }
is_ci = "1.1.1"
anyhow = "1"
walkdir = "2.3.2"
serial_test = { version = "3.4.0", default-features = false }
async-std = { version = "1.12.0", features = ["attributes"] }
termtree = "1.0.0"
insta = "1.46.3"
[package.metadata.docs.rs]
features = [
"sha1",
"document-features",
"max-performance",
"blocking-network-client",
"blocking-http-transport-curl",
"need-more-recent-msrv",
"serde",
]
[package.metadata.cargo-machete]
ignored = [
# Feature forwarding uses `prodash/*` in Cargo feature wiring without direct crate references.
"prodash",
]