Remove OpenSSL dependency; use rustls-tls exclusively#238
Open
Krechals wants to merge 1 commit into
Open
Conversation
Drop default-tls and native-tls from reqwest features and set default-features = false. This removes the openssl/openssl-sys/native-tls transitive deps, so the binary links only against libc/libm/libgcc_s — present on all Linux distros. Previously the binary required libssl.so.1.1, which does not exist on Ubuntu 24.04 (ships OpenSSL 3 only).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What did you change, and why?
Remove
default-tlsandnative-tlsfromreqwestfeatures and setdefault-features = false, keeping onlyrustls-tls.This removes the
openssl,openssl-sys, andnative-tlstransitive dependencies. The binary now only links againstlibc,libm, andlibgcc_s, which are present on all Linux distributions. Previously the binary requiredlibssl.so.1.1, which does not exist on Ubuntu 24.04 (OpenSSL 3 only), causing a startup failure:The source code already calls
.use_rustls_tls()explicitly on every reqwest client (k8s.rs), sonative-tlswas never used at runtime.Cargo.lockconfirms no transitive dependency pulls inopenssl,openssl-sys, ornative-tlseither.How do you know it works?
Built locally on Ubuntu 24.04.
lddoutput before and after:Before:
libssl.so.1.1 => not foundAfter:
Binary smoke-tested:
click --helpworks correctly.