-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add rustls feature #575
Comments
It's not possible for Cargo to activate a feature dependent on another feature in a workable fashion. We would want So this is blocked on rust-lang/cargo#3494 I definitely do want this though. |
@mehcode Maybe there is some workaround for this, because we really need |
Besides, with rustls support we can build sqlx to musl target. |
I'm not aware of a way to work-around this outside of a fork. If you can figure out a way, I'll merge a PR.
You can do that now by vendoring OpenSSL. We (LaunchBadge) do this for our production services. See #473 (comment) |
One way is to add two more features 'runtime-actix-rustls' and 'runtime-tokio-rustls' to |
Sorry if this is a silly question, but is there a reason to not switch to |
I don't think passing through the feature from one sqlx crate to another is a problem. The only problem I can see is that this is a breaking change. Since there is no default runtime, you also couldn't set a default [TLS backend + runtime combination] and it would have to be selected explicitly, like runtimes now. @mehcode Would you be open to a PR that doubles the amount of "runtimes" by having a native-tls and a rustls variant of each (or triples it to also allow no tls)? |
There's mostly API-identical alternatives to tokio-rustls is being stubborn to convert to, though?
|
#735 implements this and is now ready for review 🙂 |
#735 was merged in a way that GitHub didn't pick up (and is part of SQLx 0.4), this can be closed 🙂 |
Currently
sqlx-rt
usesnative-tls
. But librarynative-tls
is dynamically linked and it's hard sometimes to set up the environment for it (ex. docker image).But hopefully, there are rustls and tokio-rustls that can statically link SSL during compilation. I think it will be useful for many developers to have it.
Similar feature exists in actix-web.
The text was updated successfully, but these errors were encountered: