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

Function fill_imports

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

Source from the content-addressed store, hash-verified

64}
65
66fn fill_imports(module: &Module, out: &mut wasm_importtype_vec_t) {
67 let imports = module
68 .imports()
69 .map(|i| {
70 Some(Box::new(wasm_importtype_t::new(
71 i.module().to_owned(),
72 i.name().to_owned(),
73 CExternType::new(i.ty()),
74 )))
75 })
76 .collect::<Vec<_>>();
77 out.set_buffer(imports);
78}
79
80#[unsafe(no_mangle)]
81pub extern "C" fn wasm_module_exports(module: &wasm_module_t, out: &mut wasm_exporttype_vec_t) {

Callers 2

wasm_module_importsFunction · 0.85
wasmtime_module_importsFunction · 0.85

Calls 7

set_bufferMethod · 0.80
newFunction · 0.50
mapMethod · 0.45
importsMethod · 0.45
moduleMethod · 0.45
nameMethod · 0.45
tyMethod · 0.45

Tested by

no test coverage detected