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

Function createModule

test/plugins/wasm_bpf/simple_map_test.cpp:24–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22
23namespace {
24WasmEdge::Runtime::Instance::ModuleInstance *createModule() {
25 using namespace std::literals::string_view_literals;
26 WasmEdge::Plugin::Plugin::load(
27 std::filesystem::u8path("../../../plugins/wasm_bpf/" WASMEDGE_LIB_PREFIX
28 "wasmedgePluginWasmBpf" WASMEDGE_LIB_EXTENSION));
29 if (const auto *Plugin = WasmEdge::Plugin::Plugin::find("wasm_bpf"sv)) {
30 if (const auto *Module = Plugin->findModule("wasm_bpf"sv)) {
31 return Module->create().release();
32 }
33 }
34 return nullptr;
35}
36
37std::filesystem::path getAssertsPath() {
38 std::filesystem::path thisFile(__FILE__);

Callers 1

TESTFunction · 0.70

Calls 4

loadFunction · 0.50
findModuleMethod · 0.45
releaseMethod · 0.45
createMethod · 0.45

Tested by

no test coverage detected