Libs(Rust, CLI): switch from native-tls
to rustls
#1590
Merged
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.
Using rustls simplifies some of the build/distribution concerns when packaging the CLI. Namely it allows us to produce binaries without having to ensure
openssl-sys
can build, and all that that involves.Oddly, while
native-tls
is listed as an optional-but-default dep in the Rust SDK, specifying the dep on the SDK from the CLI withdefault-features = false
didn't seem to removeopenssl-sys
from the dependency tree.As a work around, I've updated the default features in the Rust SDK to target
rustls
, which does allow the sys crate to drop away.This seems fine to me. Folks who still want to use
native-tls
can elect to do so, just not by default.Some CLI features have been tuned up to support this effort, namely targeting specific individual features for
tokio
, and so on.