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

Method define_instance

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

Defines all exports of the `instance` provided in this linker with the given module name of `name`.

Source from the content-addressed store, hash-verified

67 /// Defines all exports of the `instance` provided in this linker with the
68 /// given module name of `name`.
69 Result<std::monostate>
70 define_instance(Store::Context cx, std::string_view name, Instance instance) {
71 auto *error = wasmtime_linker_define_instance(
72 ptr.get(), cx.ptr, name.data(), name.size(), &instance.instance);
73 if (error != nullptr) {
74 return Error(error);
75 }
76 return std::monostate();
77 }
78
79 /// Instantiates the module `m` provided within the store `cx` using the items
80 /// defined within this linker.

Callers 2

mainFunction · 0.80
TESTFunction · 0.80

Calls 5

ErrorClass · 0.70
getMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.64