Skip to main content

MAX_CALL_DEPTH

Constant MAX_CALL_DEPTH 

Source
pub const MAX_CALL_DEPTH: u32 = 1024;
Expand description

Maximum simultaneous call frames. Defends against unbounded recursion in agent-emitted code: a body that calls itself without a base case would otherwise blow the host’s native stack and crash the process. Real Lex code rarely exceeds ~30 frames; 1024 is generous headroom while still well under the OS stack limit at any per-frame size we use.