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

Function fill_exports

crates/c-api/src/module.rs:53–64  ·  view source on GitHub ↗
(module: &Module, out: &mut wasm_exporttype_vec_t)

Source from the content-addressed store, hash-verified

51}
52
53fn fill_exports(module: &Module, out: &mut wasm_exporttype_vec_t) {
54 let exports = module
55 .exports()
56 .map(|e| {
57 Some(Box::new(wasm_exporttype_t::new(
58 e.name().to_owned(),
59 CExternType::new(e.ty()),
60 )))
61 })
62 .collect::<Vec<_>>();
63 out.set_buffer(exports);
64}
65
66fn fill_imports(module: &Module, out: &mut wasm_importtype_vec_t) {
67 let imports = module

Callers 2

wasm_module_exportsFunction · 0.85
wasmtime_module_exportsFunction · 0.85

Calls 6

set_bufferMethod · 0.80
newFunction · 0.50
mapMethod · 0.45
exportsMethod · 0.45
nameMethod · 0.45
tyMethod · 0.45

Tested by

no test coverage detected