Rust does not bind well with C for this reason it can not become a system level programming https://way-cooler.org/blog/2019/04/29/rewriting-way-cooler-...
However, there is another programming language that does not need bindings. It is called Zig and here it explains how it solves the same problem https://youtube.com/watch?v=mwrA5IRGpfU&feature=share