wasmtime_func_new function
- @Native<Void Function(Pointer<
wasmtime_context_t> , Pointer<wasm_functype_t> , wasmtime_func_callback_t, Pointer<Void> , Pointer<NativeFunction< , Pointer<Void Function(Pointer< >Void> )>wasmtime_func_t> )>(ffi.Pointer<wasmtime_context_t>, ffi.Pointer<wasm_functype_t>, wasmtime_func_callback_t, ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>, ffi.Pointer<wasmtime_func_t>)>()
- Pointer<
wasmtime_context_t> store, - Pointer<
wasm_functype_t> type, - wasmtime_func_callback_t callback,
- Pointer<
Void> env, - Pointer<
NativeFunction< finalizer,Void Function(Pointer< >Void> )> - Pointer<
wasmtime_func_t> ret,
\brief Creates a new host-defined function.
Inserts a host-defined function into the store provided which can be used
to then instantiate a module with or define within a #wasmtime_linker_t.
\param store the store in which to create the function
\param type the wasm type of the function that's being created
\param callback the host-defined callback to invoke
\param env host-specific data passed to the callback invocation, can be
NULL
\param finalizer optional finalizer for env, can be NULL
\param ret the #wasmtime_func_t return value to be filled in.
The returned function can only be used with the specified store.
Implementation
@ffi.Native<
ffi.Void Function(
ffi.Pointer<wasmtime_context_t>,
ffi.Pointer<wasm_functype_t>,
wasmtime_func_callback_t,
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>,
ffi.Pointer<wasmtime_func_t>,
)
>()
external void wasmtime_func_new(
ffi.Pointer<wasmtime_context_t> store,
ffi.Pointer<wasm_functype_t> type,
wasmtime_func_callback_t callback,
ffi.Pointer<ffi.Void> env,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>
finalizer,
ffi.Pointer<wasmtime_func_t> ret,
);