This can be automated though; it's what we've been working on in Rust, and the approach is fundamentally language-agnostic.