Function wasmedge_sys::ffi::WasmEdge_VMAsyncExecute
source · pub unsafe extern "C" fn WasmEdge_VMAsyncExecute(
Cxt: *mut WasmEdge_VMContext,
FuncName: WasmEdge_String,
Params: *const WasmEdge_Value,
ParamLen: u32
) -> *mut WasmEdge_Async
Expand description
Asynchronous invoke a WASM function by name.
This is the final step to invoke a WASM function step by step.
After instantiating a WASM module in the VM context, the WASM module is
registered into the store in the VM context as an anonymous module. Then you
can repeatedly call this function to invoke the exported WASM functions by
their names until the VM context is reset or a new WASM module is registered
or loaded. For calling the functions in registered WASM modules with module
names, please use WasmEdge_VMAsyncExecuteRegistered
instead.
This function is thread-safe.
\param Cxt the WasmEdge_VMContext. \param FuncName the function name WasmEdge_String. \param Params the WasmEdge_Value buffer with the parameter values. \param ParamLen the parameter buffer length.
\returns WasmEdge_Async. Call WasmEdge_AsyncGet
for the result, and call
WasmEdge_AsyncDelete
to destroy this object.