aboutsummaryrefslogtreecommitdiffstats
path: root/Cargo.toml
diff options
context:
space:
mode:
authorSven-Hendrik Haase <svenstaro@gmail.com>2021-08-28 18:41:32 +0000
committerGitHub <noreply@github.com>2021-08-28 18:41:32 +0000
commit1c344f2625c1a7a4bfdf20fd891dd86f84ff8b76 (patch)
tree4e08f16c25c3f7080c454bead5791880587077e7 /Cargo.toml
parent(cargo-release) start next development iteration 0.15.1-alpha.0 (diff)
parentSwitch TLS conditional compilation to feature (diff)
downloadminiserve-1c344f2625c1a7a4bfdf20fd891dd86f84ff8b76.tar.gz
miniserve-1c344f2625c1a7a4bfdf20fd891dd86f84ff8b76.zip
Merge pull request #580 from svenstaro/conditional-tls
Conditionally enable TLS only on supported platforms
Diffstat (limited to 'Cargo.toml')
-rw-r--r--Cargo.toml13
1 files changed, 11 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d317ebb..38f018a 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -9,6 +9,7 @@ readme = "README.md"
keywords = ["serve", "http-server", "static-files", "http", "server"]
categories = ["command-line-utilities", "network-programming", "web-programming::http-server"]
edition = "2018"
+resolver = "2"
[profile.release]
lto = true
@@ -17,7 +18,7 @@ codegen-units = 1
panic = 'abort'
[dependencies]
-actix-web = { version = "3", features = ["rustls"] }
+actix-web = "3"
actix-files = "0.5"
actix-multipart = "0.3"
actix-web-httpauth = "0.5"
@@ -50,7 +51,15 @@ httparse = "1"
http = "0.2"
bytes = "1"
atty = "0.2"
-rustls = "0.18"
+rustls = { version = "0.18", optional = true }
+
+[features]
+default = ["tls"]
+# This feature allows us to use rustls only on architectures supported by ring.
+# See also https://github.com/briansmith/ring/issues/1182
+# and https://github.com/briansmith/ring/issues/562
+# and https://github.com/briansmith/ring/issues/1367
+tls = ["rustls", "actix-web/rustls"]
[dev-dependencies]
assert_cmd = "2"