Namely, `zlib` and sha1 hashing.
Unified · Split
| @@ -31,7 +31,7 @@ default = ["max"] · 30 unmodified lines | |||
| 31 | ## Everything, all at once. | 31 | ## Everything, all at once. |
| 32 | ## | 32 | ## |
| 33 | ## 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. | 33 | ## 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. |
| 34 | max = ["fast", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/regex" ] | 34 | max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"] |
| 35 | 35 | ||
| 36 | ## Like `max`, but only Rust is allowed. | 36 | ## Like `max`, but only Rust is allowed. |
| 37 | ## | 37 | ## |
| @@ -39,7 +39,10 @@ max = ["fast", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "g · 1 unmodified line | |||
| 39 | ## transports as it uses Rust's HTTP implementation. | 39 | ## transports as it uses Rust's HTTP implementation. |
| 40 | ## | 40 | ## |
| 41 | ## 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. | 41 | ## 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. |
| 42 | max-pure = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "prodash-render-line", "prodash-render-tui", "gix/max-performance-safe", "gix/comfort", "http-client-reqwest", "gitoxide-core-blocking-client", "gitoxide-core-tools", "prodash/render-line-autoconfigure", "gix/regex" ] | 42 | max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client" ] |
| 43 | |||
| 44 | ## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information. | ||
| 45 | 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" ] | ||
| 43 | 46 | ||
| 44 | ## All of the good stuff, with less fanciness for smaller binaries. | 47 | ## All of the good stuff, with less fanciness for smaller binaries. |
| 45 | ## | 48 | ## |
| @@ -64,6 +67,29 @@ small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend" · 18 unmodified lines | |||
| 64 | ## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports. | 67 | ## It uses, however, a fully asynchronous networking implementation which can serve a real-world example on how to implement custom async transports. |
| 65 | lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-async-client", "prodash-render-line"] | 68 | lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-async-client", "prodash-render-line"] |
| 66 | 69 | ||
| 70 | #! ### Package Maintainers | ||
| 71 | #! `*-control` features leave it to you to configure C libraries, involving choices for `zlib`, ! hashing and transport implementation. | ||
| 72 | #! | ||
| 73 | #! Additional features *can* be provided with `--features` and are handled by the [`gix-features` crate](https://docs.rs/gix-features/latest). | ||
| 74 | #! If nothing else is specified, the Rust implementation is used. ! Note that only one feature of each section can be enabled at a time. | ||
| 75 | #! | ||
| 76 | #! * **zlib** | ||
| 77 | #! - `gix-features/zlib-ng` | ||
| 78 | #! - `gix-features/zlib-ng-compat` | ||
| 79 | #! - `gix-features/zlib-stock` | ||
| 80 | #! - `gix-features/zlib-rust-backend` (*default if no choice is made*) | ||
| 81 | #! * **sha1** | ||
| 82 | #! - `gix-features/fast-sha1` | ||
| 83 | #! - `gix-features/rustsha1` (*default if no choice is made*) | ||
| 84 | #! * **HTTP** - see the *Building Blocks for mutually exclusive networking* headline | ||
| 85 | #! | ||
| 86 | #! #### Examples | ||
| 87 | #! | ||
| 88 | #! * `cargo build --release --no-default-features --features max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl` | ||
| 89 | #! - Create a build just like `max`, but using the stock `zlib` library instead of `zlib-ng` | ||
| 90 | #! * `cargo build --release --no-default-features --features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/fast-sha1` | ||
| 91 | #! - Create a build just like `max-pure`, but with faster hashing due to `fast-sha1`. | ||
| 92 | |||
| 67 | #! ### Building Blocks | 93 | #! ### Building Blocks |
| 68 | #! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation. | 94 | #! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation. |
| 69 | 95 | ||
| @@ -72,6 +98,11 @@ lean-async = ["fast", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools- · 2 unmodified lines | |||
| 72 | ## If disabled, the binary will be visibly smaller. | 98 | ## If disabled, the binary will be visibly smaller. |
| 73 | fast = ["gix/max-performance", "gix/comfort"] | 99 | fast = ["gix/max-performance", "gix/comfort"] |
| 74 | 100 | ||
| 101 | ## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions | ||
| 102 | ## as well as fast, hardware accelerated hashing, along with a faster zlib backend. | ||
| 103 | ## If disabled, the binary will be visibly smaller. | ||
| 104 | fast-safe = ["gix/max-performance-safe", "gix/comfort"] | ||
| 105 | |||
| 75 | ## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size. | 106 | ## Use `clap` 3.0 to build the prettiest, best documented and most user-friendly CLI at the expense of binary size. |
| 76 | ## Provides a terminal user interface for detailed and exhaustive progress. | 107 | ## Provides a terminal user interface for detailed and exhaustive progress. |
| 77 | ## Provides a line renderer for leaner progress display, without the need for a full-blown TUI. | 108 | ## Provides a line renderer for leaner progress display, without the need for a full-blown TUI. |
| @@ -98,14 +129,21 @@ gitoxide-core-tools = ["gitoxide-core/organize", "gitoxide-core/estimate-hours"] · 20 unmodified lines | |||
| 98 | gitoxide-core-tools-query = ["gitoxide-core-tools", "gitoxide-core/query"] | 129 | gitoxide-core-tools-query = ["gitoxide-core-tools", "gitoxide-core/query"] |
| 99 | 130 | ||
| 100 | #! ### Building Blocks for mutually exclusive networking | 131 | #! ### Building Blocks for mutually exclusive networking |
| 101 | #! If some of these are set at the same time a compile error is triggered. This also means that `cargo … --all-features` will fail. | 132 | #! Blocking and async features are mutually exclusive and cause a compile-time error. This also means that `cargo … --all-features` will fail. |
| 102 | 133 | #! Within each section, features can be combined. | |
| 134 | #! | ||
| 135 | #! #### Blocking | ||
| 136 | #! The backends are mutually exclusive, e.g. choose either `curl` or `request`. | ||
| 137 | #! | ||
| 103 | ## Use blocking client networking. | 138 | ## Use blocking client networking. |
| 104 | gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"] | 139 | gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"] |
| 105 | ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**. | 140 | ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**. |
| 106 | http-client-curl = ["gix/blocking-http-transport-curl"] | 141 | http-client-curl = ["gix/blocking-http-transport-curl"] |
| 107 | ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**. | 142 | ## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**. |
| 108 | http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"] | 143 | http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"] |
| 144 | |||
| 145 | #! #### Async | ||
| 146 | #! | ||
| 109 | ## Use async client networking. | 147 | ## Use async client networking. |
| 110 | gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"] | 148 | gitoxide-core-async-client = ["gitoxide-core/async-client", "futures-lite"] |
| 111 | 149 | ||
| @@ -141,6 +141,7 @@ check: ## Build all code in suitable configurations · 140 unmodified lines | |||
| 141 | && cargo check --no-default-features | 141 | && cargo check --no-default-features |
| 142 | cd gix-odb && cargo check --features serde | 142 | cd gix-odb && cargo check --features serde |
| 143 | cd cargo-smart-release && cargo check --all && cargo check --features vendored-openssl | 143 | cd cargo-smart-release && cargo check --all && cargo check --features vendored-openssl |
| 144 | cargo check --no-default-features --features max-control | ||
| 144 | 145 | ||
| 145 | unit-tests: ## run all unit tests | 146 | unit-tests: ## run all unit tests |
| 146 | cargo test --all | 147 | cargo test --all |