Hi, I'm rewriting google's gvisor in rust and find one thing without proper parallel in rust, the go:nosplit annotation.
All I can find in the internet is like we can disable all stack check by adding
rustc -C no-stack-check.
I'm still quite new to rust so it's quite possible that I missed some documentation. Do we have better alternative to provide more fine-grained control over behavior?
I have checked the option provided in
rustc -W help, only two thing related to overflow I can find are
overflowing-literals, which obviously is not what I need.
The //go:nosplit directive specifies that the next function declared in the file must not include a stack overflow check. This is most commonly used by low-level runtime sources invoked at times when it is unsafe for the calling goroutine to be preempted.