Function wasmedge_sys::ffi::WasmEdge_VMRegisterModuleFromFile
source · pub unsafe extern "C" fn WasmEdge_VMRegisterModuleFromFile(
Cxt: *mut WasmEdge_VMContext,
ModuleName: WasmEdge_String,
Path: *const c_char
) -> WasmEdge_Result
Expand description
Register and instantiate WASM into the store in VM from a WASM file.
Load a WASM file from the path, and register all exported instances and instantiate them into the store into the VM with their exported name and module name.
This function is thread-safe.
\param Cxt the WasmEdge_VMContext which contains the store. \param ModuleName the WasmEdge_String of module name for all exported instances. \param Path the NULL-terminated C string of the WASM file path.
\returns WasmEdge_Result. Call WasmEdge_ResultGetMessage
for the error
message.