MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / WasmEdge_PluginCreateModule

Function WasmEdge_PluginCreateModule

lib/api/wasmedge.cpp:3884–3899  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3882}
3883
3884WASMEDGE_CAPI_EXPORT WasmEdge_ModuleInstanceContext *
3885WasmEdge_PluginCreateModule(const WasmEdge_PluginContext *Cxt,
3886 const WasmEdge_String ModuleName) noexcept {
3887 try {
3888 if (Cxt) {
3889 if (const auto *PMod =
3890 fromPluginCxt(Cxt)->findModule(genStrView(ModuleName));
3891 PMod) {
3892 return toModCxt(PMod->create().release());
3893 }
3894 }
3895 } catch (...) {
3896 handleCAPIError();
3897 }
3898 return nullptr;
3899}
3900
3901WASMEDGE_CAPI_EXPORT void
3902WasmEdge_PluginInitWASINN(const char *const *NNPreloads,

Callers 3

TESTFunction · 0.85
createModuleCFunction · 0.85
createModuleCPPFunction · 0.85

Calls 5

genStrViewFunction · 0.85
handleCAPIErrorFunction · 0.85
findModuleMethod · 0.45
releaseMethod · 0.45
createMethod · 0.45

Tested by 3

TESTFunction · 0.68
createModuleCFunction · 0.68
createModuleCPPFunction · 0.68