diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index 7083eb3b34..4bd1cd6e72 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -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. diff --git a/crates/collections/Cargo.toml b/crates/collections/Cargo.toml index fc628d71af..461ea3e342 100644 --- a/crates/collections/Cargo.toml +++ b/crates/collections/Cargo.toml @@ -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. # @@ -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" +] diff --git a/crates/wasmi/Cargo.toml b/crates/wasmi/Cargo.toml index 0d93d44084..1a0a97035d 100644 --- a/crates/wasmi/Cargo.toml +++ b/crates/wasmi/Cargo.toml @@ -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",