xmpp-rs/tokio-xmpp/Cargo.toml
Emmanuel Gil Peyrot c24275c098 tokio-xmpp: Add support for kernel TLS
This drastically improve the debuggability of the network parts, by
moving the task of encrypting/decrypting TLS packets from userland to
the kernel.  This makes them appear in clear in strace as sendto() and
recvfrom().

I introduced a new tls-rust-ktls feature which depends on both rustls
and ktls, but isn’t enabled by default since it probably isn’t available
on every computer.  It requires the tls kernel module to be loaded,
which then can offload encryption/decryption to dedicated hardware if
available.

I have tested this change on Linux 6.11 on a rk3588.
2024-09-17 20:45:41 +00:00

64 lines
2.5 KiB
TOML

[package]
name = "tokio-xmpp"
version = "4.0.0"
authors = ["Astro <astro@spaceboyz.net>", "Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>", "pep <pep+code@bouah.net>", "O01eg <o01eg@yandex.ru>", "SonnyX <randy@vonderweide.nl>", "Paul Fariello <paul@fariello.eu>"]
description = "Asynchronous XMPP for Rust with tokio"
license = "MPL-2.0"
homepage = "https://gitlab.com/xmpp-rs/xmpp-rs"
repository = "https://gitlab.com/xmpp-rs/xmpp-rs"
documentation = "https://docs.rs/tokio-xmpp"
categories = ["asynchronous", "network-programming"]
keywords = ["xmpp", "tokio"]
edition = "2021"
[dependencies]
bytes = "1"
futures = "0.3"
log = "0.4"
tokio = { version = "1", features = ["net", "rt", "rt-multi-thread", "macros"] }
tokio-stream = { version = "0.1", features = [] }
webpki-roots = { version = "0.26", optional = true }
rustls-native-certs = { version = "0.7", optional = true }
rxml = { version = "0.12.0", features = ["compact_str"] }
rand = "0.8"
syntect = { version = "5", optional = true }
pin-project-lite = { version = "0.2" }
# same repository dependencies
sasl = { version = "0.5", path = "../sasl" }
xmpp-parsers = { version = "0.21", path = "../parsers" }
minidom = { version = "0.16", path = "../minidom" }
xso = { version = "0.1", path = "../xso" }
# these are only needed for starttls ServerConnector support
hickory-resolver = { version = "0.24", optional = true}
idna = { version = "1.0", optional = true}
native-tls = { version = "0.2", optional = true }
tokio-native-tls = { version = "0.3", optional = true }
tokio-rustls = { version = "0.26", optional = true }
ktls = { version = "6", optional = true }
[dev-dependencies]
env_logger = { version = "0.11", default-features = false, features = ["auto-color", "humantime"] }
# this is needed for echo-component example
tokio = { version = "1", features = ["test-util"] }
tokio-xmpp = { path = ".", features = ["insecure-tcp"]}
[features]
default = ["starttls-rust", "rustls-native-certs"]
starttls = ["dns"]
tls-rust = ["tokio-rustls"]
tls-rust-ktls = ["tls-rust", "ktls"]
tls-rust-native-certs = ["tls-rust", "rustls-native-certs"]
tls-rust-webpki-roots = ["tls-rust", "webpki-roots"]
tls-native = ["tokio-native-tls", "native-tls"]
starttls-native = ["starttls", "tls-native"]
starttls-rust = ["starttls", "tls-rust"]
insecure-tcp = []
syntax-highlighting = ["syntect"]
# Enable serde support in jid crate
serde = [ "xmpp-parsers/serde" ]
# Required by starttls, and used by insecure-tcp by default
dns = [ "hickory-resolver", "idna" ]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(xmpprs_doc_build)'] }