Skip to main content

register_host_fn_async

Function register_host_fn_async 

Source
pub fn register_host_fn_async<F>(
    linker: &mut Linker<StoreData>,
    module: &str,
    mangled_name: MangledName,
    ty: FuncType,
    _deterministic: bool,
    body: F,
) -> Result<()>
where F: for<'a> Fn(&'a mut Caller<'_, StoreData>, &'a [Val], &'a mut [Val]) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'a>> + Send + Sync + 'static,
Expand description

Async sibling of register_host_fn: registers under mangled_name. The body returns a boxed future; the same Err → throw_error mapping applies once it resolves.