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

Function createModuleC

test/plugins/unittest/unittest_cpp.cpp:19–32  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace {
18
19std::unique_ptr<WasmEdge::Runtime::Instance::ModuleInstance> createModuleC() {
20 using namespace std::literals::string_view_literals;
21 WasmEdge::Plugin::Plugin::load(std::filesystem::u8path(
22 "./" WASMEDGE_LIB_PREFIX
23 "wasmedgePluginTestModuleC" WASMEDGE_LIB_EXTENSION));
24 if (const auto *Plugin =
25 WasmEdge::Plugin::Plugin::find("wasmedge_plugintest_c"sv)) {
26 if (const auto *Module =
27 Plugin->findModule("wasmedge_plugintest_c_module"sv)) {
28 return Module->create();
29 }
30 }
31 return {};
32}
33
34std::unique_ptr<WasmEdge::Runtime::Instance::ModuleInstance> createModuleCPP() {
35 using namespace std::literals::string_view_literals;

Callers 1

TESTFunction · 0.70

Calls 3

loadFunction · 0.50
findModuleMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected