Skip to main content

MAX_DEPTH

Constant MAX_DEPTH 

Source
pub const MAX_DEPTH: u32 = 256;
Expand description

the recursion-depth cap, in productions. chosen generously enough that real programs never approach it (a hand-written program rarely nests more than a dozen levels deep) and conservatively enough that the native and WASM call stacks have headroom. 256 frames at the rough budget of a Pratt-recursion frame fits comfortably inside the default 1 MiB WASM stack and the default 8 MiB native one.