Skip to main content

WasmEdge_VMGetFunctionType

Function WasmEdge_VMGetFunctionType 

Source
pub unsafe extern "C" fn WasmEdge_VMGetFunctionType(
    Cxt: *const WasmEdge_VMContext,
    FuncName: WasmEdge_String,
) -> *const WasmEdge_FunctionTypeContext
Expand description

Get the function type by function name.

After instantiating a WASM module in the VM context, the WASM module is registered in the store in the VM context as an anonymous module. Then you can call this function to get the function type by the exported function name until the VM context is reset or a new WASM module is registered or loaded. For getting the function type of functions in registered WASM modules with module names, please use WasmEdge_VMGetFunctionTypeRegistered instead. The returned function type contexts are linked to the context owned by the VM context, and the caller should NOT call the WasmEdge_FunctionTypeDelete to destroy it.

This function is thread-safe.

\param Cxt the WasmEdge_VMContext. \param FuncName the function name WasmEdge_String.

\returns the function type. NULL if the function is not found.