Skip to content

Commit f34f46a

Browse files
committed
feat: Add http-client-curl-rustls (CLI) and blocking-http-transport-curl-rustls (lib) features to avoid openssl.
That way, we should be able to avoid crashes on certain CI configurations.
1 parent 9584709 commit f34f46a

File tree

3 files changed

+167
-15
lines changed

3 files changed

+167
-15
lines changed

Cargo.lock

Lines changed: 159 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ default = ["max"]
3333
## Everything, all at once.
3434
##
3535
## As fast as possible, tracing, 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.
36+
## Can be amended with the `http-client-curl-rustls` feature to avoid `openssl` as backend.
3637
max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"]
3738

3839
## Like `max`, but only Rust is allowed.
@@ -150,6 +151,8 @@ gitoxide-core-tools-archive = ["gitoxide-core/archive"]
150151
gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"]
151152
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **curl**.
152153
http-client-curl = ["gix/blocking-http-transport-curl"]
154+
## Implies `http-client-curl` and configures `curl` to use the `rust-tls` backend.
155+
http-client-curl-rustls = ["gix/blocking-http-transport-curl-rustls"]
153156
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**.
154157
http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"]
155158

gix/Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ async-network-client-async-std = ["async-std", "async-network-client", "gix-tran
120120
blocking-network-client = ["gix-protocol/blocking-client", "gix-pack/streaming-input", "attributes", "credentials"]
121121
## Stacks with `blocking-network-client` to provide support for HTTP/S using **curl**, and implies blocking networking as a whole, making the `https://` transport avaialble.
122122
blocking-http-transport-curl = ["blocking-network-client", "gix-transport/http-client-curl"]
123+
## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`.
124+
blocking-http-transport-curl-rustls = ["blocking-http-transport-curl", "dep:curl-for-configuration-only", "curl-for-configuration-only?/rustls"]
123125
## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport avaialble.
124126
blocking-http-transport-reqwest = ["blocking-network-client", "gix-transport/http-client-reqwest"]
125127
## Stacks with `blocking-http-transport-reqwest` and enables `https://` via the `rustls` crate.
@@ -260,6 +262,9 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur
260262
smallvec = "1.9.0"
261263
async-std = { version = "1.12.0", optional = true }
262264

265+
# Must match the one in `gix-transport`.
266+
curl-for-configuration-only = { package = "curl", version = "0.4", optional = true }
267+
263268
## For use in rev-parse, which provides searching commits by running a regex on their message.
264269
##
265270
## If disabled, the text will be search verbatim in any portion of the commit message, similar to

0 commit comments

Comments
 (0)