wasmtime_config_max_wasm_stack_set function

  1. @Native<Void Function(Pointer<wasm_config_t>, Size)>(ffi.Pointer<wasm_config_t>, ffi.Size)>()
void wasmtime_config_max_wasm_stack_set(
  1. Pointer<wasm_config_t> arg0,
  2. int arg1
)

\brief Configures the maximum stack size, in bytes, that JIT code can use.

This setting is 2MB by default. Configuring this setting will limit the amount of native stack space that JIT code can use while it is executing. If you're hitting stack overflow you can try making this setting larger, or if you'd like to limit wasm programs to less stack you can also configure this.

Note that this setting is not interpreted with 100% precision. Additionally the amount of stack space that wasm takes is always relative to the first invocation of wasm on the stack, so recursive calls with host frames in the middle will all need to fit within this setting.

Implementation

@ffi.Native<ffi.Void Function(ffi.Pointer<wasm_config_t>, ffi.Size)>()
external void wasmtime_config_max_wasm_stack_set(
  ffi.Pointer<wasm_config_t> arg0,
  int arg1,
);