Skip to main content

promising

Function promising 

Source
pub fn promising(func: &Function) -> Function
Expand description

Wraps a WebAssembly exported Function so that calling it returns a Promise and enables JSPI suspension inside.

Use WebAssembly.promising to obtain a “promising” wrapper around a raw WASM export; any JSPI suspensions that occur while the function executes will resolve the returned Promise when the fiber finishes.

MDN documentation