Skip to main content

MAX_PARSE_INPUT_LEN

Constant MAX_PARSE_INPUT_LEN 

Source
pub const MAX_PARSE_INPUT_LEN: usize = _; // 65_536usize
Expand description

Maximum permitted source length (in bytes) for a single ParsedExpression. An absolute cap independent of any AST-shape analysis: the parser’s recursive descent can recurse at most once per input byte, so bounding input length bounds worst-case stack use. Set to a value that leaves generous headroom in a debug-profile build on the parser worker thread (32 MB stack).

Realistic template expressions are well under 1 KB; 64 KB is two orders of magnitude above that.