Skip to main content

PARSE_STACK_SIZE

Constant PARSE_STACK_SIZE 

Source
pub const PARSE_STACK_SIZE: usize = _ /* 16_777_216usize */;
Expand description

Native stack a thread needs to parse any source the parser accepts.

Expression precedence levels forward heap-backed nodes to keep large syntax values out of recursive frames. make check-parser-stack checks accepted and refused expression nesting against a 4 MiB budget in debug and release. Declarations and other program walks still need stack headroom; Rust’s default thread stack is insufficient for the complete runtime.

The size follows the refusal, not the typical program: the parser must be able to reach the nesting limit and report it.