wasmedge_sys::ffi

Function WasmEdge_VMLoadWasmFromBytes

Source
pub unsafe extern "C" fn WasmEdge_VMLoadWasmFromBytes(
    Cxt: *mut WasmEdge_VMContext,
    Bytes: WasmEdge_Bytes,
) -> WasmEdge_Result
Expand description

Load the WASM module from a WasmEdge_Bytes.

This is the first step to invoke a WASM function step by step. Load and parse the WASM module from a WasmEdge_Bytes. You can then call WasmEdge_VMValidate for the next step.

This function is thread-safe.

\param Cxt the WasmEdge_VMContext. \param Bytes the WasmEdge_Bytes of WASM binary.

\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage for the error message.