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

Function createModule

test/plugins/wasmedge_process/wasmedge_process.cpp:34–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32}
33
34std::unique_ptr<WasmEdge::Host::WasmEdgeProcessModule> createModule() {
35 using namespace std::literals::string_view_literals;
36 WasmEdge::Plugin::Plugin::load(std::filesystem::u8path(
37 "../../../plugins/wasmedge_process/" WASMEDGE_LIB_PREFIX
38 "wasmedgePluginWasmEdgeProcess" WASMEDGE_LIB_EXTENSION));
39 if (const auto *Plugin =
40 WasmEdge::Plugin::Plugin::find("wasmedge_process"sv)) {
41 if (const auto *Module = Plugin->findModule("wasmedge_process"sv)) {
42 return dynamicPointerCast<WasmEdge::Host::WasmEdgeProcessModule>(
43 Module->create());
44 }
45 }
46 return {};
47}
48
49void fillMemContent(WasmEdge::Runtime::Instance::MemoryInstance &MemInst,
50 uint32_t Offset, uint32_t Cnt, uint8_t C = 0) noexcept {

Callers 1

TESTFunction · 0.70

Calls 3

loadFunction · 0.50
findModuleMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected