Function
fill_imports
(module: &Module, out: &mut wasm_importtype_vec_t)
Source from the content-addressed store, hash-verified
| 64 | } |
| 65 | |
| 66 | fn 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)] |
| 81 | pub extern "C" fn wasm_module_exports(module: &wasm_module_t, out: &mut wasm_exporttype_vec_t) { |
Tested by
no test coverage detected