Function wasmer_vm::wasmer_call_trampoline
source · pub unsafe fn wasmer_call_trampoline(
trap_handler: Option<*const TrapHandlerFn<'static>>,
config: &VMConfig,
vmctx: VMFunctionContext,
trampoline: VMTrampoline,
callee: *const VMFunctionBody,
values_vec: *mut u8
) -> Result<(), Trap>
Expand description
Call the wasm function pointed to by callee
.
vmctx
- the callee vmctx argumentcaller_vmctx
- the caller vmctx argumenttrampoline
- the jit-generated trampoline whose ABI takes 4 values, the callee vmctx, the caller vmctx, thecallee
argument below, and then thevalues_vec
argument.callee
- the third argument to thetrampoline
functionvalues_vec
- points to a buffer which holds the incoming arguments, and to which the outgoing return values will be written.
Safety
Wildly unsafe because it calls raw function pointers and reads/writes raw function pointers.