2 ms·
Not really, there are tools that can take C header files and spit out bindings. Rust also supports vararg C functions even though Rust itself doesn't support va
by Manishearth 10y ago
Not really, there are tools that can take C header files and spit out bindings. Rust also supports vararg C functions even though Rust itself doesn't support varargs. Writing safe Rust wrappers around these unsafe C bindings can sometimes be tedious, but this isn't worse than using C directly (which is inherently unsafe).
- kinkdr 10y agoI didn't say it is not supporting them. I said that is a bit cumbersome to have to write the shims for them. I wasn't aware of the tools that do this automatically. Just found one and it looks promising.
- Manishearth 10y agoYeah, my point was that thin shims are free, and "thick" safe shims take effort but as far as comparing with pure C is concerned you only need to compare the cost of thin shims. C doesn't have safety so the concept of a thick, safe shim is nonexistant.