MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / import_function

Method import_function

cranelift/module/src/data_context.rs:136–138  ·  view source on GitHub ↗

Declare an external function import. Users of the `Module` API generally should call `Module::declare_func_in_data` instead, as it takes care of generating the appropriate `ExternalName`.

(&mut self, name: ModuleRelocTarget)

Source from the content-addressed store, hash-verified

134 /// `Module::declare_func_in_data` instead, as it takes care of generating
135 /// the appropriate `ExternalName`.
136 pub fn import_function(&mut self, name: ModuleRelocTarget) -> ir::FuncRef {
137 self.function_decls.push(name)
138 }
139
140 /// Declares a global value import.
141 ///

Callers 3

basic_data_contextFunction · 0.45
declare_func_in_funcMethod · 0.45
declare_func_in_dataMethod · 0.45

Calls 1

pushMethod · 0.45

Tested by 1

basic_data_contextFunction · 0.36