Closed kvnxiao closed 11 months ago
Right now there is no functionality for catching stack overflows. However, I guess it would be possible to implement some stack depth limit. Will probably look into this for the next release (unclear when that's going to be), but will also be accepting PRs of course!
@PaddiM8 I took a small stab at this. Made a really small change which increments a depth counter and early-returns with a KalkError if we exceed an arbitrarily picked default depth value.
I'm using
kalk = "3.0.3"
as a library in a Rust application which takes in interactive user input. How can I configure things on the Rust side to prevent a stack overflow due to a recursive function being declared? For example, trying to parse this will obviously cause athread 'tokio-runtime-worker' has overflowed its stack
error: