No Zig definitely is special. You don’t have to do any extra busy work to call C code - you can pretty much just #include the header and that’s that. It’s similar to calling C from C++.
In any other languages - including Rust - you have to do some work declaring functions, wrapping them and so on. It’s not hard but it definitely is a non-zero amount of tedious work (especially before AI). There’s absolutely no way you could describe it as “trivial”, unless someone else has already done that work for you.
But I don’t think it is a significant Zig advantage really. When I’m writing Rust, it’s extremely rare that I want to call any C code that someone else hasn’t already done the tedious wrapping for.
No Zig definitely is special. You don’t have to do any extra busy work to call C code - you can pretty much just
#includethe header and that’s that. It’s similar to calling C from C++.In any other languages - including Rust - you have to do some work declaring functions, wrapping them and so on. It’s not hard but it definitely is a non-zero amount of tedious work (especially before AI). There’s absolutely no way you could describe it as “trivial”, unless someone else has already done that work for you.
But I don’t think it is a significant Zig advantage really. When I’m writing Rust, it’s extremely rare that I want to call any C code that someone else hasn’t already done the tedious wrapping for.
You know
bindgenexists, right?Yes. It’s not as easy and reliable as Zig.