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

Function createPluginModule

lib/vm/vm.cpp:49–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

47
48template <typename T>
49std::unique_ptr<Runtime::Instance::ModuleInstance>
50createPluginModule(std::string_view PName, std::string_view MName) {
51 using namespace std::literals::string_view_literals;
52 if (const auto *Plugin = Plugin::Plugin::find(PName)) {
53 if (const auto *Module = Plugin->findModule(MName)) {
54 return Module->create();
55 }
56 }
57 spdlog::debug("Plugin: {} , module name: {} not found. Mock instead."sv,
58 PName, MName);
59 return std::make_unique<T>();
60}
61} // namespace
62
63VM::VM(const Configure &Conf)

Callers

nothing calls this directly

Calls 3

debugFunction · 0.85
findModuleMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected