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

Function wasm_instance_exports

crates/c-api/src/instance.rs:54–71  ·  view source on GitHub ↗
(
    instance: &mut wasm_instance_t,
    out: &mut wasm_extern_vec_t,
)

Source from the content-addressed store, hash-verified

52
53#[unsafe(no_mangle)]
54pub unsafe extern "C" fn wasm_instance_exports(
55 instance: &mut wasm_instance_t,
56 out: &mut wasm_extern_vec_t,
57) {
58 let store = instance.store.clone();
59 out.set_buffer(
60 instance
61 .instance
62 .exports(instance.store.context_mut())
63 .map(|e| {
64 Some(Box::new(wasm_extern_t {
65 which: e.into_extern(),
66 store: store.clone(),
67 }))
68 })
69 .collect(),
70 );
71}
72
73#[unsafe(no_mangle)]
74pub unsafe extern "C" fn wasmtime_instance_new(

Callers 1

runFunction · 0.85

Calls 8

set_bufferMethod · 0.80
collectMethod · 0.80
context_mutMethod · 0.80
into_externMethod · 0.80
newFunction · 0.50
cloneMethod · 0.45
mapMethod · 0.45
exportsMethod · 0.45

Tested by

no test coverage detected