(
module: &mut ModuleContext<'a>,
imports: wasmparser::ImportSectionReader<'a>,
)
| 46 | } |
| 47 | |
| 48 | fn import_section<'a>( |
| 49 | module: &mut ModuleContext<'a>, |
| 50 | imports: wasmparser::ImportSectionReader<'a>, |
| 51 | ) -> wasmtime::Result<()> { |
| 52 | // Check that we can properly handle all imports. |
| 53 | for imp in imports.into_imports() { |
| 54 | let imp = imp?; |
| 55 | |
| 56 | if imp.module.starts_with("__wizer_") || imp.name.starts_with("__wizer_") { |
| 57 | wasmtime::bail!( |
| 58 | "input Wasm module already imports entities named with the `__wizer_*` prefix" |
| 59 | ); |
| 60 | } |
| 61 | |
| 62 | module.push_import(imp); |
| 63 | } |
| 64 | Ok(()) |
| 65 | } |
| 66 | |
| 67 | fn function_section<'a>( |
| 68 | module: &mut ModuleContext<'a>, |
no test coverage detected