Expand description
Closures provide a way to generate a WASM function that wraps a generic function and an environment.
A typical usage of this API is as follows:
- Allocate a function pointer for your closure with
closure_allocate - Prepare the closure with
closure_prepare - Call function pointer
- Call
closure_prepareagain to redefine the function pointer - Notify wasmer that the closure is no longer needed with
closure_free
Staticsยง
- CLOSURE_
ID ๐
Traitsยง
- ValType
Ops ๐
Functionsยง
- build_
closure_ ๐wasm_ bytes - Build a dynamically linkable WASM module for the given closure.
- closure_
prepare - Prepare a closure so that it can be called with a given signature.