wasmtime_component_linker_instance_add_func function
- @Native<Pointer<
wasmtime_error_t> Function(Pointer<wasmtime_component_linker_instance_t> , Pointer<wasm_byte_t> , Size, wasmtime_component_func_callback_t, Pointer<Void> , Pointer<NativeFunction< )>(ffi.Pointer<wasmtime_component_linker_instance_t>, ffi.Pointer<ffi.Char>, ffi.Size, wasmtime_component_func_callback_t, ffi.Pointer<ffi.Void>, ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>)>()Void Function(Pointer< >Void> )>
- Pointer<
wasmtime_component_linker_instance_t> linker_instance, - Pointer<
wasm_byte_t> name, - int name_len,
- wasmtime_component_func_callback_t callback,
- Pointer<
Void> data, - Pointer<
NativeFunction< finalizer,Void Function(Pointer< >Void> )>
\brief Define a function within this instance.
\param linker_instance the instance to define the function in
\param name the module name
\param name_len length of \p name in bytes
\param callback the callback when this function gets called
\param data host-specific data passed to the callback invocation, can be
NULL
\param finalizer optional finalizer for \p data, can be NULL
\return on success NULL, otherwise an error
Implementation
@ffi.Native<
ffi.Pointer<wasmtime_error_t> Function(
ffi.Pointer<wasmtime_component_linker_instance_t>,
ffi.Pointer<ffi.Char>,
ffi.Size,
wasmtime_component_func_callback_t,
ffi.Pointer<ffi.Void>,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>,
)
>()
external ffi.Pointer<wasmtime_error_t>
wasmtime_component_linker_instance_add_func(
ffi.Pointer<wasmtime_component_linker_instance_t> linker_instance,
ffi.Pointer<ffi.Char> name,
int name_len,
wasmtime_component_func_callback_t callback,
ffi.Pointer<ffi.Void> data,
ffi.Pointer<ffi.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Void>)>>
finalizer,
);