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

Function run

pulley/tests/all/interp.rs:19–27  ·  view source on GitHub ↗
(vm: &mut Vm, ops: &[Op])

Source from the content-addressed store, hash-verified

17}
18
19unsafe fn run(vm: &mut Vm, ops: &[Op]) -> Result<(), NonNull<u8>> {
20 let _ = env_logger::try_init();
21 let ops = encoded(ops);
22 match unsafe { vm.call(NonNull::from(&ops[..]).cast(), &[], []) } {
23 DoneReason::ReturnToHost(_) => Ok(()),
24 DoneReason::Trap { pc, .. } => Err(pc),
25 DoneReason::CallIndirectHost { .. } => unimplemented!(),
26 }
27}
28
29unsafe fn assert_one<R0, R1, V>(
30 xs: impl IntoIterator<Item = (R0, V)>,

Callers 2

assert_oneFunction · 0.70
trapFunction · 0.70

Calls 5

fromFunction · 0.85
OkFunction · 0.85
encodedFunction · 0.70
callMethod · 0.45
castMethod · 0.45

Tested by

no test coverage detected