Closed
Description
If there is sufficient room on the Rust stack to run a particular foreign function then we don't need to switch stacks. Each scheduler has a native stack size so we just need the Rust segment to be larger than that (and they can be much larger).
At that point we can annotate specific functions in core with their required stack size. It could significantly reduce the number of stack switches we do.