diff --git a/crates/core/Cargo.toml b/crates/core/Cargo.toml index 74288adf1..172e8d60d 100644 --- a/crates/core/Cargo.toml +++ b/crates/core/Cargo.toml @@ -60,6 +60,7 @@ tiny-keccak = ["alloy-primitives/tiny-keccak"] map = ["alloy-primitives/map"] map-hashbrown = ["alloy-primitives/map-hashbrown"] map-indexmap = ["alloy-primitives/map-indexmap"] +map-foldhash = ["alloy-primitives/map-foldhash"] map-fxhash = ["alloy-primitives/map-fxhash"] getrandom = ["alloy-primitives/getrandom"] diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index e7e1572db..9fd6ad059 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -95,7 +95,7 @@ criterion.workspace = true serde_json.workspace = true [features] -default = ["std", "map"] +default = ["std", "map", "map-foldhash"] std = [ "bytes/std", "hex/std", diff --git a/crates/primitives/src/map/mod.rs b/crates/primitives/src/map/mod.rs index 951fc12aa..466b3dd5d 100644 --- a/crates/primitives/src/map/mod.rs +++ b/crates/primitives/src/map/mod.rs @@ -115,7 +115,7 @@ cfg_if! { // Default hasher. cfg_if! { - if #[cfg(feature = "map-foldhash")] { + if #[cfg(all(feature = "map-foldhash", not(target_os = "zkvm")))] { type DefaultHashBuilderInner = foldhash::fast::RandomState; } else if #[cfg(feature = "map-fxhash")] { type DefaultHashBuilderInner = FxBuildHasher;