Skip to content

Commit

Permalink
Merge pull request #5039 from wasmerio/fix-missing-hash-from-artifact
Browse files Browse the repository at this point in the history
Fix missing hash from a compiled artifact
  • Loading branch information
syrusakbary committed Aug 23, 2024
2 parents f7b877b + d60c49a commit 7850c44
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/api/src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ impl Store {
&self.inner.engine
}

/// Returns mutable reference to [`Engine`]
pub fn engine_mut(&mut self) -> &mut Engine {
&mut self.inner.engine
}

/// Checks whether two stores are identical. A store is considered
/// equal to another store if both have the same engine.
pub fn same(a: &Self, b: &Self) -> bool {
Expand Down
4 changes: 2 additions & 2 deletions lib/cli/src/commands/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ impl Compile {
Target::new(target_triple.clone(), features)
})
.unwrap_or_default();
let (store, compiler_type) = self.store.get_store_for_target(target.clone())?;
let (mut store, compiler_type) = self.store.get_store_for_target(target.clone())?;

let mut engine = store.engine().clone();
let engine = store.engine_mut();
let hash_algorithm = self.hash_algorithm.unwrap_or_default().into();
engine.set_hash_algorithm(Some(hash_algorithm));

Expand Down

0 comments on commit 7850c44

Please sign in to comment.