Stream: git-wasmtime

Topic: wasmtime / PR #9975 refactor: `no_std` `rustc_hash::{FxHa...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2025 at 12:40):

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 of rustc_hash::{FxHashMap, FxHashSet} which are not exported on no_std targets. It adds type aliases to lib.rs similar to the already existing std::collections::HashMap alias.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2025 at 12:40):

JonasKruckenberg requested cfallin for a review on PR #9975.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2025 at 12:40):

JonasKruckenberg requested wasmtime-compiler-reviewers for a review on PR #9975.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2025 at 13:04):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 10 2025 at 13:04):

bjorn3 submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 11:37):

JonasKruckenberg updated PR #9975.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 11:37):

JonasKruckenberg submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 11:37):

JonasKruckenberg created PR review comment:

yeah true, simplified it

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 19:46):

cfallin submitted PR review:

Thanks! LGTM modulo some potential dead code below.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2025 at 19:46):

cfallin created PR review comment:

It doesn't look like FxHasher or Hasher 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