Open khanage opened 11 months ago
I wrote my reaction to the opinions in https://github.com/prisma/tiberius/pull/237#issuecomment-1700892327 — but tl;dr I like the approach in this PR.
It could be interesting to add a test in the github actions to ensure this behavior isn't broken later (cargo hack check --feature-powerset
with a few feature exclusions is also nice for this)
Thanks @tomhoule I've updated documentation and also noticed that we might not want any TLS implementation by looking through #305 so I've added a check to see if native-tls
is on at all.
There are test errors in CI, but they look unrelated.
Currently
native-tls
is set as a default feature, but selecting a different tls implementation requiresdefault-features = false
in your Cargo.toml.This PR will select one of the alternatives in alphabetical order, so that if you ask for
features = ["vendored-openssl", "rustls", "native-tls"]
you will get the implementation forrustls
.This solves a similar issue to #237, but uses
cfg-if
in order to just surface a single implementation where necessary.