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

Method import_funcs

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

Source from the content-addressed store, hash-verified

319 }
320
321 fn import_funcs(
322 &mut self,
323 resolve: &Resolve,
324 world: WorldId,
325 funcs: &[(&str, &Function)],
326 _files: &mut Files,
327 ) {
328 let name = PkgResolver::world_name(resolve, world);
329 let mut r#gen = self.interface(resolve, &name, Direction::Import, None);
330
331 for (_, func) in funcs {
332 r#gen.import(func);
333 }
334
335 let result = r#gen.finish();
336 self.import_world_fragment.concat(result);
337 }
338
339 fn import_types(
340 &mut self,

Callers

nothing calls this directly

Calls 4

concatMethod · 0.80
interfaceMethod · 0.45
importMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected