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

Function wasmtime_linker_define_instance

crates/c-api/src/linker.rs:124–134  ·  view source on GitHub ↗
(
    linker: &mut wasmtime_linker_t,
    store: WasmtimeStoreContextMut<'_>,
    name: *const u8,
    name_len: usize,
    instance: &Instance,
)

Source from the content-addressed store, hash-verified

122
123#[unsafe(no_mangle)]
124pub unsafe extern "C" fn wasmtime_linker_define_instance(
125 linker: &mut wasmtime_linker_t,
126 store: WasmtimeStoreContextMut<'_>,
127 name: *const u8,
128 name_len: usize,
129 instance: &Instance,
130) -> Option<Box<wasmtime_error_t>> {
131 let linker = &mut linker.linker;
132 let name = to_str!(name, name_len);
133 handle_result(linker.instance(store, name, *instance), |_linker| ())
134}
135
136#[unsafe(no_mangle)]
137pub extern "C" fn wasmtime_linker_instantiate(

Callers 2

mainFunction · 0.85
define_instanceMethod · 0.85

Calls 2

handle_resultFunction · 0.85
instanceMethod · 0.45

Tested by

no test coverage detected