Avoid enabling multiple rustls backends by accident

For this, we had to:

- Make the choice(s) of backend explicit in tokio-xmpp features
- Avoid picking a backend through transitive dependencies in xmpp
  (reqwest->hyper->rustls).

In addition, we choose the default rustls backend by default and adapt
the examples so that they can cope with either situation.
This commit is contained in:
Jonas Schäfer 2025-05-10 09:54:01 +02:00
commit 4e9e18444c
11 changed files with 134 additions and 15 deletions

View file

@ -33,7 +33,9 @@ required-features = ["avatars"]
[features]
default = ["avatars", "starttls-rust"]
starttls-native = ["tokio-xmpp/starttls", "tokio-xmpp/tls-native", "reqwest/native-tls"]
starttls-rust = ["tokio-xmpp/starttls", "tokio-xmpp/tls-rust", "reqwest/rustls-tls"]
starttls-rust = ["tokio-xmpp/starttls", "tokio-xmpp/tls-rust", "reqwest/rustls-tls-no-provider", "tokio-xmpp/tls-rust-webpki-roots"]
starttls-rust-aws_lc_rs = ["tokio-xmpp/tls-rust-aws_lc_rs", "starttls-rust"]
starttls-rust-ring = ["tokio-xmpp/tls-rust-ring", "starttls-rust"]
avatars = []
escape-hatch = []
syntax-highlighting = [ "tokio-xmpp/syntax-highlighting" ]