History

change!: drop obsolete SHA‐1 features

The hashing API has moved to `gix_hash::hasher`, and we now use `sha1-checked` unconditionally.

Emily committed 1 year ago

Commit fd12ef81 parent e4439aa7 files · +11 −27Browse files

Unified · Split

7 files
  1. .github/workflows/ci.yml +1 −1
  2. .github/workflows/release.yml +1 −2
  3. Cargo.toml +7 −10
  4. crate-status.md +0 −2
  5. gix-features/Cargo.toml +0 −4
  6. gix/Cargo.toml +2 −6
  7. justfile +0 −2
.github/workflows/ci.yml+1−1
@@ -391,7 +391,7 @@ jobs: · 390 unmodified lines
391 - name: features of gix-features391 - name: features of gix-features
392 run: |392 run: |
393 set +x393 set +x
394 for feature in progress parallel io-pipe crc32 zlib zlib-rust-backend fast-sha1 rustsha1 cache-efficiency-debug; do394 for feature in progress parallel io-pipe crc32 zlib zlib-rust-backend cache-efficiency-debug; do
395 (cd gix-features && cargo build --features "$feature" --target "$TARGET")395 (cd gix-features && cargo build --features "$feature" --target "$TARGET")
396 done396 done
397 - name: crates with 'wasm' feature397 - name: crates with 'wasm' feature
.github/workflows/release.yml+1−2
@@ -137,8 +137,7 @@ jobs: · 136 unmodified lines
137 os: windows-latest137 os: windows-latest
138 - target: aarch64-pc-windows-msvc138 - target: aarch64-pc-windows-msvc
139 os: windows-latest139 os: windows-latest
140 # on linux we build with musl which causes trouble with open-ssl. For now, just build max-pure there140 # on linux we build with musl which causes trouble with open-ssl. For now, just build max-pure there.
141 # even though we could also build with `--features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/fast-sha1` for fast hashing.
142 # It's a TODO.141 # It's a TODO.
143 exclude:142 exclude:
144 - target: x86_64-unknown-linux-musl143 - target: x86_64-unknown-linux-musl
Cargo.toml+7−10
@@ -45,7 +45,7 @@ max = ["max-control", "fast", "gitoxide-core-tools-query", "gitoxide-core-tools- · 44 unmodified lines
45## transports as it uses Rust's HTTP implementation.45## transports as it uses Rust's HTTP implementation.
46##46##
47## 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.47## 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.
48max-pure = ["max-control", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client"]48max-pure = ["max-control", "gix-features/zlib-rust-backend", "http-client-reqwest", "gitoxide-core-blocking-client"]
49 49
50## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information.50## Like `max`, but with more control for configuration. See the *Package Maintainers* headline for more information.
51max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex"]51max-control = ["tracing", "fast-safe", "pretty-cli", "gitoxide-core-tools", "prodash-render-line", "prodash-render-tui", "prodash/render-line-autoconfigure", "gix/revparse-regex"]
@@ -60,7 +60,7 @@ lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tool · 8 unmodified lines
60## This build is essentially limited to local operations without any fanciness.60## This build is essentially limited to local operations without any fanciness.
61##61##
62## Optimized for size, no parallelism thus much slower, progress line rendering.62## Optimized for size, no parallelism thus much slower, progress line rendering.
63small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal"]63small = ["pretty-cli", "gix-features/zlib-rust-backend", "prodash-render-line", "is-terminal"]
64 64
65## Like lean, but uses Rusts async implementations for networking.65## Like lean, but uses Rusts async implementations for networking.
66##66##
@@ -74,7 +74,7 @@ small = ["pretty-cli", "gix-features/rustsha1", "gix-features/zlib-rust-backend" · 7 unmodified lines
74lean-async = ["fast", "tracing", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-async-client", "prodash-render-line"]74lean-async = ["fast", "tracing", "pretty-cli", "gitoxide-core-tools", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-async-client", "prodash-render-line"]
75 75
76#! ### Package Maintainers76#! ### Package Maintainers
77#! `*-control` features leave it to you to configure C libraries, involving choices for `zlib`, ! hashing and transport implementation.77#! `*-control` features leave it to you to configure C libraries, involving choices for `zlib` and transport implementation.
78#!78#!
79#! Additional features *can* be provided with `--features` and are handled by the [`gix-features` crate](https://docs.rs/gix-features/latest).79#! Additional features *can* be provided with `--features` and are handled by the [`gix-features` crate](https://docs.rs/gix-features/latest).
80#! If nothing else is specified, the Rust implementation is used. ! Note that only one feature of each section can be enabled at a time.80#! If nothing else is specified, the Rust implementation is used. ! Note that only one feature of each section can be enabled at a time.
@@ -84,28 +84,25 @@ lean-async = ["fast", "tracing", "pretty-cli", "gitoxide-core-tools", "gitoxide- · 3 unmodified lines
84#! - `gix-features/zlib-ng-compat`84#! - `gix-features/zlib-ng-compat`
85#! - `gix-features/zlib-stock`85#! - `gix-features/zlib-stock`
86#! - `gix-features/zlib-rust-backend` (*default if no choice is made*)86#! - `gix-features/zlib-rust-backend` (*default if no choice is made*)
87#! * **sha1**
88#! - `gix-features/fast-sha1`
89#! - `gix-features/rustsha1` (*default if no choice is made*)
90#! * **HTTP** - see the *Building Blocks for mutually exclusive networking* headline87#! * **HTTP** - see the *Building Blocks for mutually exclusive networking* headline
91#!88#!
92#! #### Examples89#! #### Examples
93#!90#!
94#! * `cargo build --release --no-default-features --features max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl`91#! * `cargo build --release --no-default-features --features max-control,gix-features/zlib-stock,gitoxide-core-blocking-client,http-client-curl`
95#! - Create a build just like `max`, but using the stock `zlib` library instead of `zlib-ng`92#! - Create a build just like `max`, but using the stock `zlib` library instead of `zlib-ng`
96#! * `cargo build --release --no-default-features --features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/fast-sha1`93#! * `cargo build --release --no-default-features --features max-control,http-client-reqwest,gitoxide-core-blocking-client,gix-features/zlib-ng`
97#! - Create a build just like `max-pure`, but with faster hashing due to `fast-sha1`.94#! - Create a build just like `max-pure`, but with faster compression due to `zlib-ng`.
98 95
99#! ### Building Blocks96#! ### Building Blocks
100#! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation.97#! Typical combinations of features of our dependencies, some of which are referred to in the `gitoxide` crate's code for conditional compilation.
101 98
102## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions99## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions
103## as well as fast, hardware accelerated hashing, along with a faster zlib backend.100## as well as a faster zlib backend.
104## If disabled, the binary will be visibly smaller.101## If disabled, the binary will be visibly smaller.
105fast = ["gix/max-performance", "gix/comfort"]102fast = ["gix/max-performance", "gix/comfort"]
106 103
107## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions104## Makes the crate execute as fast as possible by supporting parallel computation of otherwise long-running functions
108## as well as fast, hardware accelerated hashing, along with a faster zlib backend.105## as well as a faster zlib backend.
109## If disabled, the binary will be visibly smaller.106## If disabled, the binary will be visibly smaller.
110fast-safe = ["gix/max-performance-safe", "gix/comfort"]107fast-safe = ["gix/max-performance-safe", "gix/comfort"]
111 108
crate-status.md+0−2
@@ -894,8 +894,6 @@ See its [README.md](https://github.com/GitoxideLabs/gitoxide/blob/main/gix-lock/ · 893 unmodified lines
894 * `in_parallel`894 * `in_parallel`
895 * `join`895 * `join`
896 * _When off all functions execute serially_896 * _When off all functions execute serially_
897* **fast-sha1**
898 * provides a faster SHA1 implementation using CPU intrinsics
899* [x] API documentation897* [x] API documentation
900 898
901### gix-tui899### gix-tui
gix-features/Cargo.toml+0−4
@@ -77,10 +77,6 @@ zlib-stock = ["zlib", "flate2?/zlib"] · 76 unmodified lines
77## may build in environments where other backends don't.77## may build in environments where other backends don't.
78zlib-rust-backend = ["zlib", "flate2?/rust_backend"]78zlib-rust-backend = ["zlib", "flate2?/rust_backend"]
79 79
80# TODO: Remove these.
81fast-sha1 = []
82rustsha1 = []
83
84#! ### Other80#! ### Other
85 81
86## Count cache hits and misses and print that debug information on drop.82## Count cache hits and misses and print that debug information on drop.
gix/Cargo.toml+2−6
@@ -217,7 +217,7 @@ blocking-http-transport-reqwest-native-tls = [ · 216 unmodified lines
217#! #### Performance217#! #### Performance
218#!218#!
219#! The reason these features exist is to allow optimization for compile time and optimize for compatibility by default. This means that some performance options around219#! 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
220#! SHA1 and 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.220#! 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.
221 221
222## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained222## Activate features that maximize performance, like using threads, but leave everything else that might affect compatibility out to allow users more fine-grained
223## control over performance features like which `zlib*` implementation to use.223## control over performance features like which `zlib*` implementation to use.
@@ -249,11 +249,7 @@ pack-cache-lru-dynamic = ["gix-pack/pack-cache-lru-dynamic"] · 25 unmodified lines
249 249
250## Activate other features that maximize performance, like usage of threads, `zlib-ng` and access to caching in object databases.250## Activate other features that maximize performance, like usage of threads, `zlib-ng` and access to caching in object databases.
251## Note that some platforms might suffer from compile failures, which is when `max-performance-safe` should be used.251## Note that some platforms might suffer from compile failures, which is when `max-performance-safe` should be used.
252max-performance = ["max-performance-safe", "zlib-ng", "fast-sha1"]252max-performance = ["max-performance-safe", "zlib-ng"]
253
254## If enabled, use assembly versions of sha1 on supported platforms.
255## This might cause compile failures as well which is why it can be turned off separately.
256fast-sha1 = ["gix-features/fast-sha1"]
257 253
258## Use the C-based zlib-ng backend, which can compress and decompress significantly faster.254## Use the C-based zlib-ng backend, which can compress and decompress significantly faster.
259## Note that this will cause duplicate symbol errors if the application also depends on `zlib` - use `zlib-ng-compat` in that case.255## Note that this will cause duplicate symbol errors if the application also depends on `zlib` - use `zlib-ng-compat` in that case.
justfile+0−2
@@ -99,8 +99,6 @@ check: · 98 unmodified lines
99 cargo check -p gix-features --all-features99 cargo check -p gix-features --all-features
100 cargo check -p gix-features --features parallel100 cargo check -p gix-features --features parallel
101 cargo check -p gix-features --features fs-read-dir101 cargo check -p gix-features --features fs-read-dir
102 cargo check -p gix-features --features rustsha1
103 cargo check -p gix-features --features fast-sha1
104 cargo check -p gix-features --features progress102 cargo check -p gix-features --features progress
105 cargo check -p gix-features --features io-pipe103 cargo check -p gix-features --features io-pipe
106 cargo check -p gix-features --features crc32104 cargo check -p gix-features --features crc32