Skip to main content

setup_with

Function setup_with 

Source
pub fn setup_with(options: SetupOptions)
Expand description

Configure the build of a napi-rs addon crate with explicit SetupOptions.

See setup for details on the build-script directives emitted.

For WASI builds, -zstack-size is resolved in the following priority order (highest to lowest):

  1. NAPI_WASI_STACK_SIZE environment variable (non-empty; an empty string "" is treated as unset)
  2. napi.wasm.stackSizeBytes in package.json (forwarded by @napi-rs/cli as NAPI_WASI_STACK_SIZE when the environment variable is unset or empty)
  3. SetupOptions::wasi_stack_size(...) in build.rs
  4. Default: 64_000_000 bytes (~61.04 MiB)