Skip to main content

register_host_value_async

Function register_host_value_async 

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

Register a host function that returns one Wasm value. The adapter owns the ABI slot; the body performs argument conversion, native work, then conversion of its result, in that order.