MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / instantiate

Method instantiate

crates/fuzzing/src/oracles/diff_wasmtime.rs:52–57  ·  view source on GitHub ↗
(&mut self, wasm: &[u8])

Source from the content-addressed store, hash-verified

50 }
51
52 fn instantiate(&mut self, wasm: &[u8]) -> Result<Box<dyn DiffInstance>> {
53 let store = self.config.to_store();
54 let module = compile_module(store.engine(), wasm, KnownValid::Yes, &self.config).unwrap();
55 let instance = WasmtimeInstance::new(store, module)?;
56 Ok(Box::new(instance))
57 }
58
59 fn assert_error_match(&self, lhs: &Error, rhs: &Trap) {
60 let lhs = lhs

Callers 1

newMethod · 0.45

Calls 6

compile_moduleFunction · 0.85
OkFunction · 0.85
to_storeMethod · 0.80
newFunction · 0.50
unwrapMethod · 0.45
engineMethod · 0.45

Tested by

no test coverage detected