Closed Hodkinson closed 3 years ago
Yes, in debug mode, Rust stack usage is heavy and functions cannot be nested deeply without overflowing the stack. That's why, under debug, the max expression nesting limit is set to a low number by default
You can relax that via Engine::set_max_expr_depths
See also #303
I see, thank you, doing engine.set_max_expr_depths(0, 0);
fixed it for me. Is that (effectively) what is used by default in release?
Release builds have a much larger limit, but by default there is a limit.
https://rhai.rs/book/safety/max-stmt-depth.html has the numbers.
It works fine in the playground, but when I run this test locally I see
Err(ParseError(ExprTooDeep, 5:39))