feat: use native-tls instead of rustls#245
Conversation
|
It might be a good idea to expose a function which allows one to pass a custom [features]
default = ["ureq/rustls"]in |
|
In #244, you noted:
I think that could be a good solution here too. Sketching out the idea:
The main downside I see is complexity, since we'd have two code paths to test. Probably not a big deal, but I think it is worth considering whether extra complexity is justified by the timing speedups. I'd like to understand your use case(s) better. Are you running only in CI, or CI and locally? Is the time spent building ovmf-prebuilt a significant portion of your overall build time? |
|
Thanks for getting back so quickly! Compared to Curl,
That would sound sensible if we decide decreasing compile times is worth these changes.
We are running both in CI and locally. We use a custom Initially, I thought that going for native-tls instead of rustls would be a free speed-up, but it seems not to be worth the downsides (see reqwest v0.13 - rustls by default - seanmonstar). |
This PR makes ureq use native-tls instead of rustls via
ureq::tls::TlsProvider.On my machine, this decreases compilation time from 5.5 s to 3.0 s.
The
TlsProviderdocs say:This PR in its current form should not be merged, though. On GitHub's ubuntu-latest and macos-latest, it works, but on windows-latest, the doc test fails with:
I don't think it is worthwhile to work around this in this crate. I assume this is not trivial, since this is not already worked around in ureq.
After having done the work, though, I still wanted to open a PR in case anyone else is interested in discussing this.