From 4bdc3d382e108072d5f30a037a6ace3604ca1202 Mon Sep 17 00:00:00 2001 From: JohnTheCoolingFan Date: Mon, 9 Oct 2023 14:53:09 +0300 Subject: [PATCH] fix: disable criterion's `rayon` feature on wasm --- Cargo.toml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 8382753..f80a878 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -42,9 +42,14 @@ wasm-opt = ["-Oz"] [dev-dependencies] base64 = "0.21.3" -criterion = "0.4" qrcode = "0.12.0" +[target.'cfg(target_arch = "wasm32")'.dev-dependencies] +criterion = { version = "0.4", default-features = false, features = ["cargo_bench_support", "plotters"]} + +[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] +criterion = "0.4" + [[bench]] name = "qr" harness = false