JonasKruckenberg opened PR #9975 from JonasKruckenberg:jonas/refactor/bringback-fx-mod
to bytecodealliance:main
:
As part of
no_std
support in cranelift this PR fixes the usage ofrustc_hash::{FxHashMap, FxHashSet}
which are not exported onno_std
targets. It adds type aliases tolib.rs
similar to the already existingstd::collections::HashMap
alias.
JonasKruckenberg requested cfallin for a review on PR #9975.
JonasKruckenberg requested wasmtime-compiler-reviewers for a review on PR #9975.
bjorn3 created PR review comment:
#[cfg(feature = "std")] pub type FxHashMap<K, V> = HashMap<K, V, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>; pub type FxHashSet<V> = HashSet<V, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
will not have any effect on which type is used on no_std and which on std.
bjorn3 submitted PR review.
JonasKruckenberg updated PR #9975.
JonasKruckenberg submitted PR review.
JonasKruckenberg created PR review comment:
yeah true, simplified it
cfallin submitted PR review:
Thanks! LGTM modulo some potential dead code below.
cfallin created PR review comment:
It doesn't look like
FxHasher
orHasher
are used anywhere in this module, and they aren't exported -- can we remove them instead?
Last updated: Jan 24 2025 at 00:11 UTC