Make criterion an optional dependency

So that it doesn't slow down every user's builds and and CI
This commit is contained in:
Brandon W Maister 2019-11-30 18:40:28 -05:00
parent 4f1c35827f
commit d0dbc61b69
1 changed files with 3 additions and 2 deletions

View File

@ -29,7 +29,7 @@ alloc = []
std = []
clock = ["time", "std"]
wasmbind = ["wasm-bindgen", "js-sys"]
__internal_bench = []
__internal_bench = ["criterion"]
[dependencies]
time = { version = "0.1.39", optional = true }
@ -37,6 +37,8 @@ num-integer = { version = "0.1.36", default-features = false }
num-traits = { version = "0.2", default-features = false }
rustc-serialize = { version = "0.3.20", optional = true }
serde = { version = "1.0.99", default-features = false, optional = true }
# technically a dev-dependency, but they can't be optional
criterion = { version = "0.3", optional = true}
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dependencies]
wasm-bindgen = { version = "0.2", optional = true }
@ -48,7 +50,6 @@ serde_derive = { version = "1", default-features = false }
bincode = { version = "0.8.0" }
num-iter = { version = "0.1.35", default-features = false }
doc-comment = "0.3"
criterion = "0.3"
[target.'cfg(all(target_arch = "wasm32", not(target_os = "emscripten")))'.dev-dependencies]
wasm-bindgen-test = "0.2"