Function wasmedge_sys::ffi::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 is executing and start to call a host function, a frame
with the module instance which the WASM function belongs to will be pushed
onto the stack. And therefore the calling frame context will record that
module instance.
So in one case that the module instance will be NULL
: developers execute
the function instance which is a host function and not added into a module
instance.
\param Cxt the WasmEdge_CallingFrameContext.
\returns the module instance of the current calling frame.