Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace direct wat usage with Wasmi's new Module::new Wat support #1327

Merged
merged 21 commits into from
Dec 1, 2024
Merged
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update Cargo.lock
Robbepop committed Dec 1, 2024
commit 43a2108ceb6c5d3f9cce47508c29b53d19f5c0b6
55 changes: 28 additions & 27 deletions Cargo.lock

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


Unchanged files with check annotations Beta

}
config.compilation_mode(compilation_mode);
let engine = wasmi::Engine::new(&config);
let wasm =
fs::read(wasm_file).map_err(|_| anyhow!("failed to read Wasm file {wasm_file:?}"))?;
let module = wasmi::Module::new(&engine, wasm).map_err(|error| {

Check warning on line 39 in crates/cli/src/context.rs

Codecov / codecov/patch

crates/cli/src/context.rs#L37-L39

Added lines #L37 - L39 were not covered by tests
anyhow!("failed to parse and validate Wasm module {wasm_file:?}: {error}")
})?;
let mut store = wasmi::Store::new(&engine, wasi_ctx);
Ir(IrError),
/// Encountered an error from the `wat` crate.
#[cfg(feature = "wat")]
Wat(WatError),

Check warning on line 200 in crates/wasmi/src/error.rs

Codecov / codecov/patch

crates/wasmi/src/error.rs#L200

Added line #L200 was not covered by tests
}
impl ErrorKind {
Self::ResumableHost(error) => Display::fmt(error, f),
Self::Ir(error) => Display::fmt(error, f),
#[cfg(feature = "wat")]
Self::Wat(error) => Display::fmt(error, f),

Check warning on line 269 in crates/wasmi/src/error.rs

Codecov / codecov/patch

crates/wasmi/src/error.rs#L269

Added line #L269 was not covered by tests
}
}
}