Skip to content

Commit

Permalink
feat: Add http-client-curl-rustls (CLI) and `blocking-http-transpor…
Browse files Browse the repository at this point in the history
…t-curl-rustls` (lib) features to avoid openssl.

That way, we should be able to avoid crashes on certain CI configurations.
  • Loading branch information
Byron committed Oct 15, 2023
1 parent 9584709 commit f34f46a
Show file tree
Hide file tree
Showing 3 changed files with 167 additions and 15 deletions.
174 changes: 159 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ default = ["max"]
## Everything, all at once.
##
## 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.
## Can be amended with the `http-client-curl-rustls` feature to avoid `openssl` as backend.
max = ["max-control", "fast", "gitoxide-core-blocking-client", "http-client-curl"]

## Like `max`, but only Rust is allowed.
Expand Down Expand Up @@ -150,6 +151,8 @@ gitoxide-core-tools-archive = ["gitoxide-core/archive"]
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"]
## Implies `http-client-curl` and configures `curl` to use the `rust-tls` backend.
http-client-curl-rustls = ["gix/blocking-http-transport-curl-rustls"]
## 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"]

Expand Down
5 changes: 5 additions & 0 deletions gix/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@ async-network-client-async-std = ["async-std", "async-network-client", "gix-tran
blocking-network-client = ["gix-protocol/blocking-client", "gix-pack/streaming-input", "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 avaialble.
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`.
blocking-http-transport-curl-rustls = ["blocking-http-transport-curl", "dep:curl-for-configuration-only", "curl-for-configuration-only?/rustls"]
## 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.
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.
Expand Down Expand Up @@ -260,6 +262,9 @@ serde = { version = "1.0.114", optional = true, default-features = false, featur
smallvec = "1.9.0"
async-std = { version = "1.12.0", optional = true }

# Must match the one in `gix-transport`.
curl-for-configuration-only = { package = "curl", version = "0.4", 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
Expand Down

0 comments on commit f34f46a

Please sign in to comment.