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

Function wasm_func_new

crates/c-api/src/func.rs:96–102  ·  view source on GitHub ↗
(
    store: &mut wasm_store_t,
    ty: &wasm_functype_t,
    callback: wasm_func_callback_t,
)

Source from the content-addressed store, hash-verified

94
95#[unsafe(no_mangle)]
96pub unsafe extern "C" fn wasm_func_new(
97 store: &mut wasm_store_t,
98 ty: &wasm_functype_t,
99 callback: wasm_func_callback_t,
100) -> Box<wasm_func_t> {
101 create_function(store, ty, move |params, results| callback(params, results))
102}
103
104#[unsafe(no_mangle)]
105pub unsafe extern "C" fn wasm_func_new_with_env(

Callers 1

runFunction · 0.85

Calls 2

create_functionFunction · 0.70
callbackFunction · 0.50

Tested by

no test coverage detected