[package] name = "gitoxide" description = "A command-line application for interacting with git repositories" repository = "https://github.com/Byron/gitoxide" authors = ["Sebastian Thiel "] edition = "2021" license = "MIT OR Apache-2.0" version = "0.26.0" default-run = "gix" include = ["src/**/*", "LICENSE-*", "README.md", "CHANGELOG.md"] resolver = "2" [[bin]] name = "ein" path = "src/ein.rs" test = false doctest = false [[bin]] name = "gix" path = "src/gix.rs" test = false doctest = false [features] default = ["max"] #! ### Build Configuration #! These combine common choices of building blocks to represent typical builds. ## Everything, all at once. ## ## As fast as possible, with TUI progress, progress line rendering with auto-configuration, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs. max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"] ## Like `max`, but only Rust is allowed. ## ## This is the most compatible build as it won't need a C compiler or C toolchains to build. It's also not the fastest as or the most feature-rich in terms of available ## transports as it uses Rust's HTTP implementation. ## ## As fast as possible, with TUI progress, progress line rendering with auto-configuration, all transports available but less mature pure Rust HTTP implementation, all `ein` tools, CLI colors and local-time support, JSON output, regex support for rev-specs. max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ] ## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information. max-control = ["fast-safe", "pretty-cli", "gitoxide-core-tools-query", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/regex" ] ## All of the good stuff, with less fanciness for smaller binaries. ## ## As fast as possible, progress line rendering, all transports based on their most mature implementation (HTTP), all `ein` tools, CLI colors and local-time support, JSON output. lean = ["fast", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line" ] ## The smallest possible build, best suitable for small single-core machines. ## ## This build is essentially limited to local operations without any fanciness. ## ## Optimized for size, no parallelism thus much slower, progress line rendering. small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal" ] ## Like lean, but uses Rusts async implementations for networking. ## ## This build is more of a demonstration showing how async can work with `gitoxide`, which generally is blocking. This also means that the selection of async transports ## is very limited to only HTTP (without typical `git` configuration) and git over TCP like provided by the `git daemon`. ## ## As fast as possible, progress line rendering, less feature-ful HTTP (pure Rust) and only `git-damon` support, all `ein` tools, CLI colors and local-time support, JSON output. ## ## Due to async client-networking not being implemented for most transports, this one supports only the 'git+tcp' and HTTP transport. ## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports. lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-async-client", "prodash-render-line"] #! ### Package Maintainers #! `*-control` features leave it to you to configure C libraries, involving choices for `zlib`, ! hashing and transport implementation. #! #! Additional features *can* be provided with `--features` and are handled by the [`gix-features` crate](https://docs.rs/gix-features/latest). #! If nothing else is specified, the Rust implementation is used. ! Note that only one feature of each section can be enabled at a time. #! #! * **zlib** #! - `gix-features/zlib-ng` #! - `gix-features/zlib-ng-compat` #! - `gix-features/zlib-stock` #! - `gix-features/zlib-rust-backend` (*default if no choice is made*) #! * **sha1** #! - `gix-features/fast-sha1` #! - `gix-features/rustsha1` (*default if no choice is made*) #! * **HTTP** - see the *Building Blocks for mutually exclusive networking* headline #! #! #### Examples #! #! * `cargo build --release --no-default-features --features max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl` #! - Create a build just like `max`, but using the stock `zlib` library instead of `zlib-ng` #! * `cargo build --release --no-default-features --features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/fast-sha1` #! - Create a build just like `max-pure`, but with faster hashing due to `fast-sha1`. #! ### Building Blocks #! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation. ## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions ## as well as fast, hardware accelerated hashing, along with a faster zlib backend. ## If disabled, the binary will be visibly smaller. fast = ["gix/max-performance", "gix/comfort"] ## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions ## as well as fast, hardware accelerated hashing, along with a faster zlib backend. ## If disabled, the binary will be visibly smaller. fast-safe = ["gix/max-performance-safe", "gix/comfort"] ## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size. ## Provides a terminal user interface for detailed and exhaustive progress. ## Provides a line renderer for leaner progress display, without the need for a full-blown TUI. pretty-cli = [ "gitoxide-core/serde", "prodash/progress-tree", "prodash/progress-tree-log", "prodash/local-time", "env_logger/humantime", "env_logger/color", "env_logger/auto-color" ] ## The `--verbose` flag will be powered by an interactive progress mechanism that doubles as log as well as interactive progress ## that appears after a short duration. prodash-render-line-crossterm = ["prodash-render-line", "prodash/render-line-crossterm", "prodash/signal-hook", "is-terminal", "crosstermion"] ## Progress reporting with a TUI, can then be enabled with the `--progress` flag. prodash-render-tui = ["prodash/render-tui", "prodash/render-tui-crossterm", "prodash/progress-tree", "futures-lite"] ## Progress reporting by visually drawing lines into the terminal without switching to an alternate window. prodash-render-line = ["prodash/render-line", "prodash-render-line-crossterm", "prodash/progress-tree"] ## Prints statistical information to inform about cache efficiency when those are dropped. ## Use this as a way to understand if bigger caches actually produce greater yiedls. cache-efficiency-debug = ["gix-features/cache-efficiency-debug"] ## A way to enable most `gitoxide-core` tools found in `ein tools`, namely `organize` and `estimate hours`. gitoxide-core-tools = ["gitoxide-core/organize", "gitoxide-core/estimate-hours"] ## A program to perform analytics on a `git` repository, using an auto-maintained sqlite database gitoxide-core-tools-query = ["gitoxide-core-tools", "gitoxide-core/query"] #! ### Building Blocks for mutually exclusive networking #! Blocking and async features are mutually exclusive and cause a compile-time error. This also means that `cargo … --all-features` will fail. #! Within each section, features can be combined. #! #! #### Blocking #! The backends are mutually exclusive, e.g. choose either `curl` or `request`. #! ## Use blocking client networking. gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"] ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**. http-client-curl = ["gix/blocking-http-transport-curl"] ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**. http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"] #! #### Async #! ## Use async client networking. gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"] [dependencies] anyhow = "1.0.42" gitoxide-core = { version = "^0.28.0", path = "gitoxide-core" } gix-features = { version = "^0.30.0", path = "gix-features" } gix = { version = "^0.45.1", path = "gix", default-features = false } time = "0.3.19" clap = { version = "4.1.1", features = ["derive", "cargo"] } prodash = { version = "25.0.0", optional = true, default-features = false } is-terminal = { version = "0.4.0", optional = true } env_logger = { version = "0.10.0", default-features = false } crosstermion = { version = "0.11.0", optional = true, default-features = false } futures-lite = { version = "1.12.0", optional = true, default-features = false, features = ["std"] } # for progress owo-colors = "3.5.0" tabled = { version = "0.10.0", default-features = false } document-features = { version = "0.2.0", optional = true } [profile.dev.package] gix-object = { opt-level = 3 } gix-ref = { opt-level = 3 } #gix-pack = { opt-level = 3 } gix-hash = { opt-level = 3 } gix-actor = { opt-level = 3 } gix-config = { opt-level = 3 } miniz_oxide = { opt-level = 3 } sha1 = { opt-level = 3 } sha1_smol = { opt-level = 3 } [profile.release] overflow-checks = false lto = "fat" # this bloats files but assures destructors are called, important for tempfiles. One day I hope we # can wire up the 'abrt' signal handler so tempfiles will be removed in case of panics. panic = 'unwind' codegen-units = 1 incremental = false build-override = { opt-level = 0 } # It's not quite worth building dependencies with more optimizations yet. Let's keep it here for later. #[profile.dev.package."*"] #opt-level = 2 [workspace] members = [ "gix-actor", "gix-url", "gix-hash", "gix-validate", "gix-ref", "gix-command", "gix-config", "gix-config-value", "gix-discover", "gix-features", "gix-commitgraph", "gix-chunk", "gix-quote", "gix-object", "gix-glob", "gix-diff", "gix-date", "gix-traverse", "gix-index", "gix-bitmap", "gix-worktree", "gix-revision", "gix-packetline", "gix-mailmap", "gix-note", "gix-negotiate", "gix-fetchhead", "gix-prompt", "gix-filter", "gix-sec", "gix-lfs", "gix-rebase", "gix-sequencer", "gix-submodule", "gix-transport", "gix-credentials", "gix-protocol", "gix-pack", "gix-odb", "gix-tempfile", "gix-lock", "gix-attributes", "gix-ignore", "gix-pathspec", "gix-refspec", "gix-path", "gix-utils", "gix-fs", "gix", "gitoxide-core", "gix-hashtable", "gix-tui", "gix-tix", "gix-archive", "gix-revwalk", "cargo-smart-release", "tests/tools", "gix-diff/tests", "gix-pack/tests", "gix-index/tests", "gix-ref/tests", "gix-config/tests", "gix-traverse/tests", ] exclude = ["cargo-smart-release/tests/fixtures/tri-depth-workspace/a", "cargo-smart-release/tests/fixtures/tri-depth-workspace/b", "cargo-smart-release/tests/fixtures/tri-depth-workspace/c"] [package.metadata.docs.rs] features = ["document-features", "max"] rustdoc-args = ["--cfg", "docsrs"]