MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / module

Method module

crates/c-api/include/wasmtime/linker.hh:97–105  ·  view source on GitHub ↗

Defines instantiations of the module `m` within this linker under the given `name`.

Source from the content-addressed store, hash-verified

95 /// Defines instantiations of the module `m` within this linker under the
96 /// given `name`.
97 Result<std::monostate> module(Store::Context cx, std::string_view name,
98 const Module &m) {
99 auto *error = wasmtime_linker_module(ptr.get(), cx.ptr, name.data(),
100 name.size(), m.capi());
101 if (error != nullptr) {
102 return Error(error);
103 }
104 return std::monostate();
105 }
106
107 /// Attempts to load the specified named item from this linker, returning
108 /// `std::nullopt` if it was not defined.

Callers 9

fill_importsFunction · 0.45
wasmtime_linker_moduleFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 6

wasmtime_linker_moduleFunction · 0.85
ErrorClass · 0.70
getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
capiMethod · 0.45

Tested by 4

TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36