From d6ac99f1d72695c7492f8de434aab647af5ce638 Mon Sep 17 00:00:00 2001 From: ConnorSkees <39542938+ConnorSkees@users.noreply.github.com> Date: Mon, 25 May 2020 14:10:48 -0400 Subject: [PATCH] make criterion an optional rather than dev dep criterion was making it take too long to compile tests, and there is no way to turn it off --- Cargo.toml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 0882ce1..96c15fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,6 +54,9 @@ rand = { version = "0.7.3", optional = true } codemap = "0.1.3" peekmore = "0.4.0" wasm-bindgen = { version = "0.2.60", optional = true } +# criterion is not a dev-dependency because it makes tests take too +# long to compile, and you cannot make dev-dependencies optional +criterion = { version = "0.3.2", optional = true } [features] default = ["commandline", "random"] @@ -67,11 +70,12 @@ random = ["rand"] wasm = ["wasm-bindgen"] # Option: enable features that assist in profiling (e.g. inline(never)) profiling = [] +# Option: enable criterion for benchmarking +bench = ["criterion"] [dev-dependencies] tempfile = "3" paste = "0.1" -criterion = "0.3.2" [profile.release] debug = true