-
Notifications
You must be signed in to change notification settings - Fork 10
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
Stop automatically pulling in aws-lc as a dependency #46
Conversation
Could this be done in a way that isn't backwards incompatible? Maybe keep the rustls feature as using the defaults of rustls and having a rustls-core feature that doesn't have the defaults? |
@tmccombs I have pushed a new commit which aims to provide backwards compatibility. |
rustls-aws-lc = ["rustls-core", "tokio-rustls/aws-lc-rs"] | ||
rustls-fips = ["rustls-aws-lc", "tokio-rustls/fips"] | ||
rustls-ring = ["rustls-core", "tokio-rustls/ring"] | ||
rustls = ["rustls-aws-lc", "tokio-rustls/default"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably also include "tokio-rustls/tls12" and "tokio-rustls/logging" since those are included in the default features.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But aren't we including the tokio-rustls/default
feature already? It should pull them in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah you're right
@@ -9,7 +9,11 @@ license = "Apache-2.0" | |||
|
|||
[features] | |||
default = ["tokio-net"] | |||
rustls = ["tokio-rustls"] | |||
rustls-core = ["tokio-rustls"] | |||
rustls-aws-lc = ["rustls-core", "tokio-rustls/aws-lc-rs"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these features aren't strictly necessary.
The user could potentially enable these features on the tokio-rustls dependency directly.
All this create actually needs to depend on is the core tokio-rustls api.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, you are right. But consider the fact that tokio-rustls
which is also an "intermediate" crate between us and the actual rustls
crate has similar feature flags which do nothing but pass themselves to rustls
. (I've checked it's source code and they actually do nothing else)
This fixes an issue I had when trying to cross-compile my project.
aws-lc
would refuse to compile due to some problems in their build system. Although it is not atls-listener
issue, allowing dependent crates to fine-tine features of nested dependencies is reasonable.