7 Likes
This is a bit unrelated, but I remember @andrewrk proposing Builtin function to tell you the maximum stack size of a given function · Issue #157 · ziglang/zig · GitHub.
If this is actually possible, maybe it can greatly optimize GCO call, since it is safe to call C functions directly.
Some Go packages calls C function directly without CGO, but this is unsafe.