awkrs 0.1.38

Awk implementation in Rust with broad CLI compatibility, parallel records, and experimental Cranelift JIT
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Hard limits to avoid unbounded host stack use and pathological recursion.

/// Maximum nested depth for user-defined function calls (VM).
///
/// Kept conservative: each depth level uses native stack in the VM, so a very large
/// limit can still overflow the host stack before the check trips.
#[cfg(test)]
pub const MAX_USER_CALL_DEPTH: usize = 32;
#[cfg(not(test))]
pub const MAX_USER_CALL_DEPTH: usize = 256;

#[cfg(test)]
mod tests {
    #[test]
    fn test_build_uses_lower_call_depth_cap() {
        assert_eq!(super::MAX_USER_CALL_DEPTH, 32);
    }
}