Function wasmer_vm::trap::traphandlers::on_wasm_stack

source ยท
fn on_wasm_stack<F: FnOnce() -> T + 'static, T: 'static>(
    stack_size: usize,
    trap_handler: Option<*const TrapHandlerFn<'static>>,
    f: F,
) -> Result<T, UnwindReason>
Expand description

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.