wasmedge_sys::ffi

Function WasmEdge_ExecutorInvoke

Source
pub unsafe extern "C" fn WasmEdge_ExecutorInvoke(
    Cxt: *mut WasmEdge_ExecutorContext,
    FuncCxt: *const WasmEdge_FunctionInstanceContext,
    Params: *const WasmEdge_Value,
    ParamLen: u32,
    Returns: *mut WasmEdge_Value,
    ReturnLen: u32,
) -> WasmEdge_Result
Expand description

Invoke a WASM function by the function instance.

After instantiating a WASM module, developers can get the function instance context from the module instance. Then developers can invoke the function through this API.

\param Cxt the WasmEdge_ExecutorContext. \param FuncCxt the function instance context to invoke. \param Params the WasmEdge_Value buffer with the parameter values. \param ParamLen the parameter buffer length. \param [out] Returns the WasmEdge_Value buffer to fill the return values. \param ReturnLen the return buffer length.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.