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

Method instantiateModule

lib/executor/executor.cpp:16–27  ·  view source on GitHub ↗

Instantiate a WASM Module. See "include/executor/executor.h".

Source from the content-addressed store, hash-verified

14
15/// Instantiate a WASM Module. See "include/executor/executor.h".
16Expect<std::unique_ptr<Runtime::Instance::ModuleInstance>>
17Executor::instantiateModule(Runtime::StoreManager &StoreMgr,
18 const AST::Module &Mod) {
19 return instantiate(StoreMgr, Mod).map_error([this](auto E) {
20 // If statistics are enabled, dump them here.
21 // When an error occurs, subsequent execution will not run.
22 if (Stat) {
23 Stat->dumpToLog(Conf);
24 }
25 return E;
26 });
27}
28
29/// Register a named WASM module. See "include/executor/executor.h".
30Expect<std::unique_ptr<Runtime::Instance::ModuleInstance>>

Callers 4

unsafeRunWasmFileMethod · 0.80
unsafeInstantiateMethod · 0.80
TESTFunction · 0.80

Calls 1

dumpToLogMethod · 0.80

Tested by 1

TESTFunction · 0.64