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

Method get

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

Attempts to load the specified named item from this linker, returning `std::nullopt` if it was not defined.

Source from the content-addressed store, hash-verified

107 /// Attempts to load the specified named item from this linker, returning
108 /// `std::nullopt` if it was not defined.
109 [[nodiscard]] std::optional<Extern>
110 get(Store::Context cx, std::string_view module, std::string_view name) {
111 wasmtime_extern_t item;
112 if (wasmtime_linker_get(ptr.get(), cx.ptr, module.data(), module.size(),
113 name.data(), name.size(), &item)) {
114 return detail::cvt_extern(item);
115 }
116 return std::nullopt;
117 }
118
119 /// Defines a new function in this linker in the style of the `Func`
120 /// constructor.

Callers 11

allow_shadowingMethod · 0.45
defineMethod · 0.45
define_wasiMethod · 0.45
define_instanceMethod · 0.45
instantiateMethod · 0.45
moduleMethod · 0.45
func_newMethod · 0.45
func_wrapMethod · 0.45
get_defaultMethod · 0.45

Calls 4

wasmtime_linker_getFunction · 0.85
cvt_externFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected