From 043696a87e3514d1d9ac6c9e3a1f925ee020be84 Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 11 Jun 2020 13:01:00 +0200 Subject: openpgp: Make dependency on rand optional. --- openpgp/Cargo.toml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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"] -- cgit v1.2.3