summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2020-06-11 13:01:00 +0200
committerJustus Winter <justus@sequoia-pgp.org>2020-06-11 13:01:00 +0200
commit043696a87e3514d1d9ac6c9e3a1f925ee020be84 (patch)
tree329b48e67fe8d53da4bd5ee7deed914209ec55eb
parenta4d2e75ea6cf56e57aed397720931b22c7d1a123 (diff)
openpgp: Make dependency on rand optional.
-rw-r--r--openpgp/Cargo.toml11
1 files changed, 10 insertions, 1 deletions
diff --git a/openpgp/Cargo.toml b/openpgp/Cargo.toml
index 0698a7bb..51989352 100644
--- a/openpgp/Cargo.toml
+++ b/openpgp/Cargo.toml
@@ -34,7 +34,7 @@ libc = "0.2"
memsec = "0.5.6"
nettle = { version = "7", optional = true }
quickcheck = { version = "0.9", default-features = false, optional = true }
-rand = { version = "0.7", default-features = false }
+rand = { version = "0.7", default-features = false, optional = true }
regex = "1"
thiserror = "1"
unicode-normalization = "= 0.1.9"
@@ -45,6 +45,7 @@ lalrpop = "0.17"
[dev-dependencies]
rpassword = "=4.0.3"
quickcheck = { version = "0.9", default-features = false }
+rand = { version = "0.7", default-features = false }
[features]
default = ["compression", "crypto-nettle"]
@@ -60,6 +61,14 @@ compression-bzip2 = ["bzip2", "buffered-reader/compression-bzip2"]
vendored = ["vendored-nettle"]
vendored-nettle = ["nettle/vendored"]
+# Testing, debugging, and fuzzing.
+
+# XXX: This feature should just be called 'quickcheck'. However, this
+# currently collides with the implicitly created feature for the
+# optional dependency 'quickcheck'. Blocker:
+# https://github.com/rust-lang/cargo/issues/5565
+x-quickcheck = ["quickcheck", "rand"]
+
[[example]]
name = "pad"
required-features = ["compression-deflate"]