Skip to content

Commit

Permalink
Add no-hash-maps crate feature to wasmi_cli + enable by default (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Robbepop authored Oct 6, 2024
1 parent e6fe69b commit 7f3cf05
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ wat = "1"
[dev-dependencies]
assert_cmd = "2.0.7"

[features]
default = ["no-hash-maps"]
no-hash-maps = ["wasmi/no-hash-maps"]

# We need to put this [profile.release] section due to this bug in Cargo:
# https://github.com/rust-lang/cargo/issues/8264
# Uncomment the lines below before publishing a new `wasmi_cli` release to crates.io.
Expand Down
8 changes: 7 additions & 1 deletion crates/collections/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ string-interner = { version = "0.17", default-features = false, features = ["inl
ahash = { version = "0.8.11", default-features = false }

[features]
default = ["std"]
default = ["std", "no-hash-maps"]
std = ["string-interner/std"]
# Tells the `wasmi_collections` crate to avoid using hash based maps and sets.
#
Expand All @@ -29,3 +29,9 @@ std = ["string-interner/std"]
#
# An example of such an environment is `wasm32-unknown-unknown`.
no-hash-maps = []

[package.metadata.cargo-udeps.ignore]
normal = [
# The string-interner dependency is always specified even though it is unused when no-hash-maps is enabled.
"string-interner"
]
2 changes: 1 addition & 1 deletion crates/wasmi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ anyhow = "1.0"
criterion = { version = "0.5", default-features = false }

[features]
default = ["std"]
default = ["std", "no-hash-maps"]
std = [
"wasmi_core/std",
"wasmi_collections/std",
Expand Down

0 comments on commit 7f3cf05

Please sign in to comment.