From 9983bb53c3f0cf0657be0931ebdb3f435e9108e9 Mon Sep 17 00:00:00 2001 From: Paolo Barbolini Date: Wed, 9 Sep 2020 12:05:50 +0200 Subject: [PATCH] chore(Cargo.toml): try to tidy up the list of features and dependencies --- Cargo.toml | 75 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 28 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index add9f06..7aba32c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,33 +17,47 @@ is-it-maintained-open-issues = { repository = "lettre/lettre" } maintenance = { status = "actively-developed" } [dependencies] +idna = "0.2" +tracing = { version = "0.1.16", default-features = false, features = ["std"], optional = true } # feature + +# builder +hyperx = { version = "1", optional = true, features = ["headers"] } +mime = { version = "0.3", optional = true } +uuid = { version = "0.8", features = ["v4"] } +rand = { version = "0.7", optional = true } +quoted_printable = { version = "0.4", optional = true } +base64 = { version = "0.12", optional = true } +once_cell = "1" +regex = "1" + +# file transport +serde = { version = "1", optional = true, features = ["derive"] } +serde_json = { version = "1", optional = true } + +# smtp +nom = { version = "5", optional = true } +r2d2 = { version = "0.8", optional = true } # feature +hostname = { version = "0.3", optional = true } # feature + +## tls +native-tls = { version = "0.2", optional = true } # feature +rustls = { version = "0.18", optional = true } +webpki = { version = "0.21", optional = true } +webpki-roots = { version = "0.20", optional = true } + +# async +futures-io = { version = "0.3", optional = true } +futures-util = { version = "0.3", features = ["io"], optional = true } + +## async-std async-attributes = { version = "1.1", optional = true } async-std = { version = "1.5", optional = true, features = ["unstable"] } async-trait = { version = "0.1", optional = true } + +## tokio tokio02_crate = { package = "tokio", version = "0.2.7", features = ["fs", "process", "tcp", "dns", "io-util"], optional = true } tokio02_native_tls_crate = { package = "tokio-native-tls", version = "0.1", optional = true } tokio02_rustls = { package = "tokio-rustls", version = "0.14", optional = true } -futures-io = { version = "0.3", optional = true } -futures-util = { version = "0.3", features = ["io"], optional = true } -base64 = { version = "0.12", optional = true } -hostname = { version = "0.3", optional = true } -hyperx = { version = "1", optional = true, features = ["headers"] } -idna = "0.2" -tracing = { version = "0.1.16", default-features = false, features = ["std"], optional = true } -mime = { version = "0.3", optional = true } -native-tls = { version = "0.2", optional = true } -nom = { version = "5", optional = true } -once_cell = "1" -quoted_printable = { version = "0.4", optional = true } -r2d2 = { version = "0.8", optional = true } -rand = { version = "0.7", optional = true } -regex = "1" -rustls = { version = "0.18", optional = true } -serde = { version = "1", optional = true, features = ["derive"] } -serde_json = { version = "1", optional = true } -uuid = { version = "0.8", features = ["v4"] } -webpki = { version = "0.21", optional = true } -webpki-roots = { version = "0.20", optional = true } [dev-dependencies] criterion = "0.3" @@ -57,17 +71,22 @@ harness = false name = "transport_smtp" [features] +default = ["file-transport", "smtp-transport", "native-tls", "hostname", "r2d2", "sendmail-transport", "builder"] + +builder = ["mime", "base64", "hyperx", "rand", "quoted_printable"] + +# transports +file-transport = ["serde", "serde_json"] +sendmail-transport = [] +smtp-transport = ["base64", "nom"] + +rustls-tls = ["webpki", "webpki-roots", "rustls"] + +# async async-std1 = ["async-std", "async-trait", "async-attributes"] tokio02 = ["tokio02_crate", "async-trait", "futures-io", "futures-util"] tokio02-native-tls = ["tokio02", "native-tls", "tokio02_native_tls_crate"] tokio02-rustls-tls = ["tokio02", "rustls-tls", "tokio02_rustls"] -builder = ["mime", "base64", "hyperx", "rand", "quoted_printable"] -default = ["file-transport", "smtp-transport", "native-tls", "hostname", "r2d2", "sendmail-transport", "builder"] -file-transport = ["serde", "serde_json"] -# native-tls -rustls-tls = ["webpki", "webpki-roots", "rustls"] -sendmail-transport = [] -smtp-transport = ["base64", "nom"] [package.metadata.docs.rs] all-features = true