feat(download/rustls): use `aws-lc` instead of `ring`
Closes #3820 by replacing the ring backend with aws-lc.
Fortunately, with https://github.com/seanmonstar/reqwest/pull/2301, it's now possible to totally disable ring at compile time.
Tested locally on macOS 14.5 via the following command with positive outcome:
> RUSTUP_LOG=TRACE RUSTUP_FORCE_ARG0=rustup rustup run stable cargo run -- update
@djc Hmmm, it looks like there are some link time errors WRT rustls-platform-verifier when building for aarch64-pc-windows-msvc. Is that platform supported though? (After installing nasm and ninja, aws-lc on that platform doesn't seem like a blocker anymore.)
It's been week without real progress on this one :(
Failures related to symbol conflicts between aws-lc-rs and openssl, such as this one, should (hopefully) resolve with our next aws-lc-sys release.
We're also working to resolve Android-related issues, but I'm not sure whether our latest changes would resolve the failure. Based on the error message, I think it might just require setting the ANDROID_NDK environment variable?
Failures related to symbol conflicts between aws-lc-rs and openssl, such as this one, should (hopefully) resolve with our next aws-lc-sys release.
@justsmth Thanks a whole lot for the investigation! I just got a bit sidetracked due to personal reasons in the past few weeks, sorry about that... π Looks like the clash with OpenSSL is very likely the root cause, I'm looking towards the new version :)
We're also working to resolve Android-related issues, but I'm not sure whether our latest changes would resolve the failure. Based on the error message, I think it might just require setting the
ANDROID_NDKenvironment variable?
You're right. Setting $ENV{ANDROID_NDK} did address the issue for me! Many thanks!
We've now released aws-lc-sys v0.20.1. π (*fingers crossed* -- hoping all the builds succeed next time. βΊοΈ )
Please let us know if you have any other issues with building aws-lc-rs.
We've now released aws-lc-sys v0.20.1. π (fingers crossed -- hoping all the builds succeed next time. βΊοΈ )
Please let us know if you have any other issues with building aws-lc-rs.
@justsmth Ohhhhhh that's so cool! Thank you so much for chasing this all the way down!
One thing to notice though is that we currently don't test for all cross-compilation targets in PRs to save some quota, so there is a small possibility that I might need your help again when we're cutting a new release, as that's usually when all tests are actually run. That said, I'm definitely looking forward to shipping this with Rustup v1.28!
Great work!
(Nit: IMO the commits here are not logically separate -- in particular, including the first commit would make CI fail until the last commit is added -- so I would just squash all of this into a single commit.)
@djc Commits squashed as requested. Merging...