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

Function createModule

test/plugins/wasmedge_llmc/wasmedge_llmc.cpp:36–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36std::unique_ptr<WasmEdge::Host::WasmEdgeLLMCModule> createModule() {
37 using namespace std::literals::string_view_literals;
38 WasmEdge::Plugin::Plugin::load(std::filesystem::u8path(
39 "../../../plugins/wasmedge_llmc/" WASMEDGE_LIB_PREFIX
40 "wasmedgePluginWasmEdgeLLMC" WASMEDGE_LIB_EXTENSION));
41 if (const auto *Plugin = WasmEdge::Plugin::Plugin::find("wasmedge_llmc"sv)) {
42 if (const auto *Module = Plugin->findModule("wasmedge_llmc"sv)) {
43 return dynamicPointerCast<WasmEdge::Host::WasmEdgeLLMCModule>(
44 Module->create());
45 }
46 }
47 return {};
48}
49} // namespace
50
51template <typename T>

Callers 1

TESTFunction · 0.70

Calls 3

loadFunction · 0.50
findModuleMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected