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

Method declare_import

crates/rust/src/bindgen.rs:61–72  ·  view source on GitHub ↗
(&mut self, name: &str, params: &[WasmType], results: &[WasmType])

Source from the content-addressed store, hash-verified

59 }
60
61 fn declare_import(&mut self, name: &str, params: &[WasmType], results: &[WasmType]) -> String {
62 let tmp = self.tmp();
63 let rust_name = format!("wit_import{tmp}");
64 self.src.push_str(&crate::declare_import(
65 self.wasm_import_module,
66 name,
67 &rust_name,
68 params,
69 results,
70 ));
71 rust_name
72 }
73
74 fn let_results(&mut self, amt: usize, results: &mut Vec<String>) {
75 match amt {

Callers 1

emitMethod · 0.45

Calls 3

declare_importFunction · 0.85
tmpMethod · 0.45
push_strMethod · 0.45

Tested by

no test coverage detected