Skip to main content

WasmEdge_CallingFrameGetModuleInstance

Function WasmEdge_CallingFrameGetModuleInstance 

Source
pub unsafe extern "C" fn WasmEdge_CallingFrameGetModuleInstance(
    Cxt: *const WasmEdge_CallingFrameContext,
) -> *const WasmEdge_ModuleInstanceContext
Expand description

Get the module instance of the current calling frame.

When a WASM function executes and starts to call a host function, a frame with the module instance to which the WASM function belongs will be pushed onto the stack. Therefore, the calling frame context will record that module instance. The module instance will be NULL when developers execute a host function instance that is not added to a module instance.

\param Cxt the WasmEdge_CallingFrameContext.

\returns the module instance of the current calling frame.