Background information: I have a function that calls itself both directly and indirectly through other functions, and would like a cheap way to fail gracefully should the program run out of call stack. I could count calls manually, but I would like a more elegant and robust way of achieving this.
Is it possible to determine current call stack depth using stable Rust?
The only options I could find are:
The stacker crate seems to provide the functionality you seek:
The library supports the Linux, Windows and macOS targets.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With