Skip to content

Commit 7f3cf05

Browse files
authored
Add no-hash-maps crate feature to wasmi_cli + enable by default (#1225)
* use no-hash-maps feature in wasmi_cli * add no-hash-maps crate feature to wasmi_cli * enable no-hash-maps by default * udeps: ignore string-interner dependency
1 parent e6fe69b commit 7f3cf05

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

crates/cli/Cargo.toml

+4
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ wat = "1"
2323
[dev-dependencies]
2424
assert_cmd = "2.0.7"
2525

26+
[features]
27+
default = ["no-hash-maps"]
28+
no-hash-maps = ["wasmi/no-hash-maps"]
29+
2630
# We need to put this [profile.release] section due to this bug in Cargo:
2731
# https://github.com/rust-lang/cargo/issues/8264
2832
# Uncomment the lines below before publishing a new `wasmi_cli` release to crates.io.

crates/collections/Cargo.toml

+7-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ string-interner = { version = "0.17", default-features = false, features = ["inl
1919
ahash = { version = "0.8.11", default-features = false }
2020

2121
[features]
22-
default = ["std"]
22+
default = ["std", "no-hash-maps"]
2323
std = ["string-interner/std"]
2424
# Tells the `wasmi_collections` crate to avoid using hash based maps and sets.
2525
#
@@ -29,3 +29,9 @@ std = ["string-interner/std"]
2929
#
3030
# An example of such an environment is `wasm32-unknown-unknown`.
3131
no-hash-maps = []
32+
33+
[package.metadata.cargo-udeps.ignore]
34+
normal = [
35+
# The string-interner dependency is always specified even though it is unused when no-hash-maps is enabled.
36+
"string-interner"
37+
]

crates/wasmi/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ anyhow = "1.0"
4040
criterion = { version = "0.5", default-features = false }
4141

4242
[features]
43-
default = ["std"]
43+
default = ["std", "no-hash-maps"]
4444
std = [
4545
"wasmi_core/std",
4646
"wasmi_collections/std",

0 commit comments

Comments
 (0)