-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 'h1-client-rustls' feature relying on rustls #271
Conversation
CI failures for |
I will look more at the failures soon, but I think this would perhaps be better named as Ideally I'd like to separate out the tls backend flags... hyper has the same thing, I think. I haven't been able to figure out a good way to do that though... |
@Fishrock123 I don't see such separation in hyper's features.
I don't think Cargo provides a way to declare such "feature replacement in case of another feature usage". Thinking further, a solution could be such reorg in http-client features: [features]
default = ["h1_client", "async-native-tls"]
h1_client = ["async-h1", "async-std"]
h1_rustls = ["async-tls"] And re-exposing the same in Surf. A user wanting h1 + rustls would use such dependency: surf = { version = "2.1.0", default-features = false, features = ["h1-client", "h1-rustls"] } The drawback is that using What do you think ? |
|
I also think we should re-organize http-client features. It's a big reason i never did another http-client release yet, because I wasn't sure what to do.
This actually isn't so bad, we can make http-client compile without tls support if nothing is provided. Ideally, I think, http-client would have |
I have created a zulip thread about this to discuss with the cargo team... https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/co-dependant.20feature.20flag.20dependencies |
Maybe we just need to stick with |
@JEnoch mind to rebase this? |
It seems like rust-lang/cargo#8832 will eventually allow |
Sure! Doing this shortly. |
Note that this PR relies on main branch of http-client (for http-rs/http-client#53 and http-rs/http-client#58). |
I've released http-client 6.3.0 |
Merged a working set of features as #292, which is more like the original without my poor suggestion on feature separation (which is not yet supported by cargo in the way which we'd need). Thanks for your work and patience here! |
This PR is a follow-up of http-rs/http-client#53 and addresses #40.
It adds a
h1-client-rustls
feature usinghttp-client/h1_client_rustls
feature introduced by http-rs/http-client#53.TODO:
For testing purpose I set the dependency to
http-client
to directly use its Git repo.Once http-client is released with http-rs/http-client#53, update the dependency to use the latest version.