Skip to main content

NESTING_DEPTH_LIMIT

Constant NESTING_DEPTH_LIMIT 

Source
pub const NESTING_DEPTH_LIMIT: usize = 64;
Expand description

Hard cap on container-nesting depth ([/{) tracked through the DSL parser, the JSON-form pre-pass scan, and (by construction, since ArgValue::Array and ArgValue::Object are only ever built inside the depth-guarded parser functions) any $prev reference nested inside array/object literals.

64 gives generous headroom over real khive ops payloads (observed at 2-4 levels of nesting) while remaining far too shallow for a native recursive descent to threaten the thread stack (CWE-674).