Function wasmedge_sys::ffi::WasmEdge_ModuleInstanceAddGlobal
source · pub unsafe extern "C" fn WasmEdge_ModuleInstanceAddGlobal(
Cxt: *mut WasmEdge_ModuleInstanceContext,
Name: WasmEdge_String,
GlobalCxt: *mut WasmEdge_GlobalInstanceContext
)
Expand description
Add a global instance context into a WasmEdge_ModuleInstanceContext.
Export and move the ownership of the global instance into the module instance. The caller should NOT access or destroy the global instance context after calling this function.
This function is thread-safe.
\param Cxt the WasmEdge_ModuleInstanceContext to add the global instance. \param Name the export global name WasmEdge_String. \param GlobalCxt the WasmEdge_GlobalInstanceContext to add.