this post was submitted on 15 Jul 2026
146 points (96.8% liked)

Rust

8141 readers
17 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] FizzyOrange@programming.dev 3 points 4 days ago (1 children)

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.

[–] BB_C@programming.dev 1 points 4 days ago (1 children)

You know bindgen exists, right?

[–] FizzyOrange@programming.dev 2 points 3 days ago

Yes. It's not as easy and reliable as Zig.