pub fn closure_allocate<M: MemorySize>(
ctx: FunctionEnvMut<'_, WasiEnv>,
closure: WasmPtr<u32, M>,
) -> Result<Errno, WasiError>
Expand description
Allocate a new slot in the __indirect_function_table for a closure
Until the slot is prepared with closure_prepare
, it is undefined behavior to call the function at the given index.
The slot should be freed with closure_free
when it is no longer needed.