Skip to content

Libs(Rust, CLI): switch from native-tls to rustls #1590

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

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

svix-onelson
Copy link
Contributor

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 with default-features = false didn't seem to remove openssl-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.

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 with
`default-features = false` didn't seem to remove `openssl-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.
@tasn
Copy link
Member

tasn commented Dec 26, 2024

TBH, I think rusttls is a better default for the rust sdk anyway...

@svix-onelson svix-onelson marked this pull request as ready for review December 26, 2024 19:48
@svix-onelson svix-onelson requested a review from a team as a code owner December 26, 2024 19:48
@svix-onelson svix-onelson merged commit 78fe3a1 into main Dec 26, 2024
9 checks passed
@svix-onelson svix-onelson deleted the onelson/rust-sdk-cli-use-rustls branch December 26, 2024 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants