MCPcopy Create free account
hub / github.com/bytecodealliance/wit-bindgen / import_funcs

Method import_funcs

crates/rust/src/lib.rs:1298–1313  ·  view source on GitHub ↗
(
        &mut self,
        resolve: &Resolve,
        world: WorldId,
        funcs: &[(&str, &Function)],
        _files: &mut Files,
    )

Source from the content-addressed store, hash-verified

1296 }
1297
1298 fn import_funcs(
1299 &mut self,
1300 resolve: &Resolve,
1301 world: WorldId,
1302 funcs: &[(&str, &Function)],
1303 _files: &mut Files,
1304 ) {
1305 self.import_funcs_called = true;
1306
1307 let mut r#gen = self.interface(Identifier::World(world), "$root", resolve, true);
1308
1309 r#gen.generate_imports(funcs.iter().map(|(_, func)| *func), None);
1310
1311 let src = r#gen.finish();
1312 self.src.push_str(&src);
1313 }
1314
1315 fn export_interface(
1316 &mut self,

Callers 1

finish_importsMethod · 0.45

Calls 6

generate_importsMethod · 0.80
mapMethod · 0.80
interfaceMethod · 0.45
iterMethod · 0.45
finishMethod · 0.45
push_strMethod · 0.45

Tested by

no test coverage detected