Expand description
WebAssembly trap handling, which is built on top of the lower-level signalhandling mechanisms.
Structsยง
- Trap
Handler ๐Context Read-only information that is used by signal handlers to handle and recover from traps. - Configuration for the runtime VM Currently only the stack size is configurable
Enumsยง
- Unwind
Reason ๐
Constantsยง
- TRAP_
HANDLER ๐ - YIELDER ๐
Staticsยง
- DEFAULT_
STACK_ ๐SIZE - MAGIC ๐
- PREV_
SIGBUS ๐ - PREV_
SIGFPE ๐ - PREV_
SIGILL ๐ - PREV_
SIGSEGV ๐
Functionsยง
- Catches any wasm traps that happen within the execution of
closure
, returning them as aResult
. - get_
pc_ ๐ โsp - This function is required to be called before any WebAssembly is entered. This will configure global state such as signal handlers to prepare the process to receive wasm traps.
- A module for registering a custom alternate signal stack (sigaltstack).
- When executing on the Wasm stack, temporarily switch back to the host stack to perform an operation that should not be constrainted by the Wasm stack limits.
- on_
wasm_ ๐stack Runs the given function on a separate stack so that its stack usage can be bounded. Stack overflows and other traps can be caught and execution returned to the root of the stack. - platform_
init ๐ โ - process_
illegal_ ๐ โop - Raises a trap from inside library code immediately.
- Raises a user-defined trap immediately.
- Carries a Rust panic across wasm code and resumes the panic on the other side.
- Default stack size is 1MB.
- trap_
handler ๐ โ - unwind_
with ๐ โ - update_
context ๐ โ - Call the wasm function pointed to by
callee
.
Type Aliasesยง
- Function which may handle custom signals while processing traps.