Skip to content

Commit 3774a03

Browse files
committed
feat: add http-client-curl-rust-openssl feature, and make it the default.
Previously it was implicit, now it's explicit so it can be turned off. When that's the case, the `openssl` dependencies will be removed.
1 parent b2e7137 commit 3774a03

3 files changed

Lines changed: 18 additions & 2 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ default = ["max"]
3737
##
3838
## As fast as possible, tracing, with TUI progress, progress line rendering with autoconfiguration, 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.
3939
## Can be amended with the `http-client-curl-rustls` feature to avoid `openssl` as backend.
40-
max = ["max-control", "fast", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-blocking-client", "http-client-curl"]
40+
##
41+
## ### Note
42+
##
43+
## When used in conjunction with `http-client-curl-rustls`, the `openssl` crates will still be compiled, but won't be used. To bypass this, disable
44+
## default dependencies and specify the features yourself.
45+
max = ["max-control", "fast", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-blocking-client", "http-client-curl-openssl"]
4146

4247
## Like `max`, but only Rust is allowed.
4348
##
@@ -54,7 +59,7 @@ max-control = ["tracing", "fast", "pretty-cli", "gitoxide-core-tools", "prodash-
5459
## All the good stuff, with less fanciness for smaller binaries.
5560
##
5661
## 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.
57-
lean = ["fast", "tracing", "pretty-cli", "http-client-curl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line"]
62+
lean = ["fast", "tracing", "pretty-cli", "http-client-curl-openssl", "gitoxide-core-tools-query", "gitoxide-core-tools-corpus", "gitoxide-core-tools", "gitoxide-core-blocking-client", "prodash-render-line"]
5863

5964
## The smallest possible build, best suitable for small single-core machines.
6065
##
@@ -140,6 +145,8 @@ gitoxide-core-blocking-client = ["gitoxide-core/blocking-client"]
140145
http-client-curl = ["gix/blocking-http-transport-curl"]
141146
## Implies `http-client-curl` and configures `curl` to use the `rust-tls` backend.
142147
http-client-curl-rustls = ["gix/blocking-http-transport-curl-rustls"]
148+
## Implies `http-client-curl` and configures `curl` to use the `openssl` backend.
149+
http-client-curl-openssl = ["gix/blocking-http-transport-curl-openssl"]
143150
## Support synchronous 'http' and 'https' transports (e.g. for clone, fetch and push) using **reqwest**.
144151
http-client-reqwest = ["gix/blocking-http-transport-reqwest-rust-tls"]
145152

gix/Cargo.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,16 @@ blocking-http-transport-curl = [
190190
"gix-transport/http-client-curl",
191191
]
192192
## Stacks with `blocking-http-transport-curl` and also enables the `rustls` backend to avoid `openssl`.
193+
## This feature takes precedence over `http-client-curl-rust-ssl`.
193194
blocking-http-transport-curl-rustls = [
194195
"blocking-http-transport-curl",
195196
"gix-transport/http-client-curl-rust-tls",
196197
]
198+
## Stacks with `blocking-http-transport-curl` and also enables the `openssl` backend.
199+
blocking-http-transport-curl-openssl = [
200+
"blocking-http-transport-curl",
201+
"gix-transport/http-client-curl-openssl",
202+
]
197203
## Stacks with `blocking-network-client` to provide support for HTTP/S using **reqwest**, and implies blocking networking as a whole, making the `https://` transport available.
198204
blocking-http-transport-reqwest = [
199205
"blocking-network-client",

0 commit comments

Comments
 (0)