Skip to content

Commit

Permalink
Use rustc-hash for module exports
Browse files Browse the repository at this point in the history
  • Loading branch information
grovesNL committed Jan 26, 2024
1 parent 5c0027b commit 42ac253
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/environ/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ log = { workspace = true }
gimli = { workspace = true, features = ["write"] }
object = { workspace = true, features = ['write_core'] }
rustc-demangle = { version = "0.1.16", optional = true }
rustc-hash = "1.1"
target-lexicon = { workspace = true }
wasm-encoder = { workspace = true, optional = true }
wasmprinter = { workspace = true, optional = true }
Expand Down
4 changes: 3 additions & 1 deletion crates/environ/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
use crate::{ModuleTranslation, PrimaryMap, Tunables, WasmHeapType, WASM_PAGE_SIZE};
use cranelift_entity::{packed_option::ReservedValue, EntityRef};
use indexmap::IndexMap;
use rustc_hash::FxHasher;
use serde_derive::{Deserialize, Serialize};
use std::collections::BTreeMap;
use std::convert::TryFrom;
use std::hash::BuildHasherDefault;
use std::mem;
use std::ops::Range;
use wasmtime_types::*;
Expand Down Expand Up @@ -804,7 +806,7 @@ pub struct Module {
pub initializers: Vec<Initializer>,

/// Exported entities.
pub exports: IndexMap<String, EntityIndex>,
pub exports: IndexMap<String, EntityIndex, BuildHasherDefault<FxHasher>>,

/// The module "start" function, if present.
pub start_func: Option<FuncIndex>,
Expand Down

0 comments on commit 42ac253

Please sign in to comment.