Skip to content

Commit

Permalink
Disabling criterion dev-dependency when targeting wasm (#3806)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored Aug 7, 2023
1 parent 24ed217 commit c8c9126
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 16 deletions.
5 changes: 4 additions & 1 deletion components/calendar/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transf
libm = { version = "0.2", default-features = false }

[dev-dependencies]
criterion = "0.4"
icu = { path = "../icu", default-features = false }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
serde = { version = "1.0", features = ["derive", "alloc"] }
serde_json = "1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"


[features]
default = ["compiled_data"]
std = ["icu_provider/std", "icu_locid/std"]
Expand Down
2 changes: 2 additions & 0 deletions components/collator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transf
arraystring = "0.3.0"
atoi = "1.0.0"
icu = { path = "../icu" }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
Expand Down
4 changes: 3 additions & 1 deletion components/collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ postcard = { version = "1.0.0", features = ["alloc"], default-features = false }
toml = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
criterion = "0.4"
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
iai = "0.1.1"
icu = { path = "../icu", default-features = false }
icu_properties = { path = "../properties" }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
std = []
serde = ["dep:serde", "zerovec/serde"]
Expand Down
4 changes: 3 additions & 1 deletion components/datetime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transf
litemap = { version = "0.7.0", path = "../../utils/litemap", optional = true }

[dev-dependencies]
criterion = "0.4"
icu = { path = "../icu", default-features = false }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_provider_adapters = { path = "../../provider/adapters" }
Expand All @@ -65,6 +64,9 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
bincode = "1.3"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
default = ["compiled_data"]
std = [
Expand Down
4 changes: 3 additions & 1 deletion components/decimal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ icu_decimal_data = { version = "~1.3.0", path = "data", optional = true }
icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transform", optional = true }

[dev-dependencies]
criterion = "0.4"
icu = { path = "../icu", default-features = false }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_provider_adapters = { path = "../../provider/adapters" }
Expand All @@ -50,6 +49,9 @@ rand_pcg = "0.3"
rand_distr = "0.4"
getrandom = { version = "0.2", features = ["js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
default = ["compiled_data"]
std = ["fixed_decimal/std", "icu_locid/std", "icu_provider/std"]
Expand Down
4 changes: 3 additions & 1 deletion components/locid/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ serde = { version = "1.0", default-features = false, features = ["alloc", "deriv
zerovec = { version = "0.9.4", path = "../../utils/zerovec", optional = true }

[dev-dependencies]
criterion = "0.4"
iai = "0.1.1"
icu = { path = "../icu", default-features = false }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
Expand All @@ -48,6 +47,9 @@ postcard = { version = "1.0.0", default-features = false, features = ["use-std"]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
std = []
databake = ["dep:databake"]
Expand Down
4 changes: 3 additions & 1 deletion components/locid_transform/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ displaydoc = { version = "0.2.3", default-features = false }
icu_locid_transform_data = { version = "~1.3.0", path = "data", optional = true }

[dev-dependencies]
criterion = "0.4"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
icu = { path = "../icu" }
writeable = { path = "../../utils/writeable" }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[lib]
bench = false # This option is required for Benchmark CI
path = "src/lib.rs"
Expand Down
4 changes: 3 additions & 1 deletion components/plurals/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,14 @@ icu_plurals_data = { version = "~1.3.0", path = "data", optional = true }
icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transform", optional = true }

[dev-dependencies]
criterion = "0.4"
icu = { path = "../icu" }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
default = ["compiled_data"]
std = ["fixed_decimal/std", "icu_locid/std", "icu_provider/std"]
Expand Down
4 changes: 3 additions & 1 deletion components/segmenter/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,14 @@ icu_segmenter_data = { version = "~1.3.0", path = "data", optional = true }
icu_locid_transform = { version = "1.2.0", path = "../../components/locid_transform", optional = true }

[dev-dependencies]
criterion = "0.4"
serde = { version = "1.0", default-features = false, features = ["derive"] }
serde_json = "1.0"
icu = { path = "../../components/icu" }
itertools = "0.10"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
default = ["compiled_data", "auto"]
std = ["icu_collections/std", "icu_locid/std", "icu_provider/std"]
Expand Down
4 changes: 3 additions & 1 deletion experimental/bies/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,9 @@ strum = { version = "0.20", features = ["derive"] }
writeable = { version = "0.5.1", path = "../../utils/writeable" }

[dev-dependencies]
criterion = "0.4"
rand = "0.8"
rand_distr = "0.4"
rand_pcg = "0.3"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"
2 changes: 2 additions & 0 deletions experimental/casemap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ icu_normalizer = { path = "../../components/normalizer" }
icu_collections = { path = "../../components/collections", features = ["databake"] }
icu_codepointtrie_builder = { version = "0.3.4", path = "../../components/collections/codepointtrie_builder" }
databake = { version = "0.1.3", path = "../../utils/databake", default-features = false}

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"


Expand Down
4 changes: 3 additions & 1 deletion experimental/ixdtf/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,7 @@ all-features = true
[dependencies]

[dev-dependencies]
criterion = "0.4"
serde-json-core = { version = "0.4", features = ["std"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"
4 changes: 3 additions & 1 deletion provider/fs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,15 @@ postcard = { version = "1.0.0", features = ["alloc"], default-features = false,
serde_json = { version = "1.0", optional = true }

[dev-dependencies]
criterion = "0.4"
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_locid = { path = "../../components/locid", features = ["serde"] }
icu_provider = { path = "../core", features = ["deserialize_json", "deserialize_bincode_1", "deserialize_postcard_1", "datagen"] }
icu_datagen = { path = "../datagen" }
writeable = { path = "../../utils/writeable" }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
# Enables the "export" module and FilesystemExporter
export = [
Expand Down
3 changes: 3 additions & 0 deletions provider/testdata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,11 @@ icu_timezone = { version = "1.2.0", path = "../../components/timezone", default-
[dev-dependencies]
icu = { path = "../../components/icu" }
icu_provider = { path = "../../provider/core", features = ["deserialize_json"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"


[features]
default = [
"icu_calendar",
Expand Down
4 changes: 3 additions & 1 deletion utils/fixed_decimal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ writeable = { version = "0.5.1", path = "../../utils/writeable" }
ryu = { version = "1.0.5", features = ["small"], optional = true }

[dev-dependencies]
criterion = "0.4"
getrandom = { version = "0.2", features = ["js"] }
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
rand = "0.8"
rand_distr = "0.4"
rand_pcg = "0.3"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
std = []
bench = []
Expand Down
4 changes: 3 additions & 1 deletion utils/litemap/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,16 @@ yoke = { version = "0.7.1", path = "../yoke", features = ["derive"], optional =
[dev-dependencies]
bincode = "1"
bytecheck = "0.6"
criterion = "0.4"
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
icu_locid = { path = "../../components/locid" }
postcard = { version = "1.0.0", features = ["use-std"], default-features = false }
rkyv = { version = "0.7", features = ["validation"] }
serde = "1"
serde_json = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
bench = []
default = ["alloc"]
Expand Down
4 changes: 3 additions & 1 deletion utils/tinystr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,13 @@ databake = { version = "0.1.3", path = "../../utils/databake", optional = true }

[dev-dependencies]
bincode = "1.3"
criterion = "0.4"
postcard = { version = "1.0.0", features = ["use-std"], default-features = false }
rand = { version = "0.8.5", features = ["small_rng"] }
serde_json = { version = "1.0", default-features = false, features = ["alloc"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
default = ["alloc"]
alloc = []
Expand Down
4 changes: 3 additions & 1 deletion utils/writeable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ independent = true
all-features = true

[dev-dependencies]
criterion = "0.4"
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
rand = { version = "0.8", features = ["small_rng"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
bench = []

Expand Down
4 changes: 3 additions & 1 deletion utils/zerovec/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ t1ha = { version = "0.1", optional = true }

[dev-dependencies]
bincode = "1.3"
criterion = "0.4"
getrandom = { version = "0.2", features = ["js"] }
iai = "0.1"
icu_benchmark_macros = { path = "../../tools/benchmark/macros" }
Expand All @@ -60,6 +59,9 @@ serde_json = "1.0"
yoke = { path = "../yoke", features = ["derive"] }
zerofrom = { path = "../zerofrom", features = ["derive"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
criterion = "0.4"

[features]
std = []
derive = ["dep:zerovec-derive"]
Expand Down

0 comments on commit c8c9126

Please sign in to comment.