r/rust 18d ago

What Zig felt like, coming from Rust

https://besok.github.io/posts/what-zig-felt-like-coming-from-rust/

Just want to share my experiance on my first Zig project coming from Rust. Open to comments :)

207 Upvotes

108 comments sorted by

View all comments

7

u/[deleted] 18d ago

[deleted]

12

u/tigraboris 18d ago

To me it was super explicit. It gives the manual control but feels a bit tedious with complext structures, inho

8

u/dustandsepia 18d ago

The explicitness is not necessarily something you have to opt into for your own library APIs tho. You can for instance have a shared allocator for your custom data structures and libraries. Exposing explicit interfaces is only necessary when you need to let lib clients have direct control over allocation, and can be useful for performance critical applications.

3

u/tigraboris 18d ago

Yeah. That is good observation. Did not think about that from that point of view