How security sensitive is getaddrinfo? The recent vulnerability was actually in glibc's DNS client library, libresolv, not getaddrinfo itself (but it was triggered when using getaddrinfo). Therefore, I think that rewriting libresolv in Rust (and possibly the DNS NSS module) would be more fruitful than trying to rewrite getaddrinfo. It would also be easier - libresolv is in its own .so so you could swap the entire thing out, rather than having to patch glibc or use LD_PRELOAD hacks. (I actually started working on this a few days ago :-)