Stay calm - this is no more than an idea in progress.
I’m curious if anyone else is looking into stack safety through compile time analysis - a subset of Rust without recursion or calloca. Based on my initial investigation, there would need to be some small changes to the LLVM shim to enable calling addPassesToEmitFile() with a StopAfter as the prologue pass.
I could see a lint copying the AST, doing a dummy codegen pass and extracting the stack sizes from the resulting LLVM context.
Totally mis-read your post sorry. Yep, there are some things you can’t handle - but we can handle the majority of cases and stick the rest in unsafe for the time being.
But it doesn’t look like this is on many people’s radar.