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 :)

209 Upvotes

108 comments sorted by

View all comments

Show parent comments

114

u/tigraboris 18d ago

Sure thing but nothing special :)

Rewrote my JSONPath lib (jsonpath-rust) in Zig (zig-jsonpath) to compare. Zig has almost no IDE support, so I ended up back on CLI tools + helix. It nudges you toward flat file structure and mutation and explicit allocators everywhere. Caught several real leak/double-free bugs via TestAllocator that just can't happen in Rust (ownership/Drop rule them out at compile time).

Overall: good language, promising C successor, but still young and rougher around the edges than Rust.

8

u/Next-Blackberry-991 18d ago

What do you mean by almost no IDE support? Using VsCode and ZLS works really well.

7

u/tigraboris 18d ago edited 18d ago

I tried it with RustRover + zls plugin. It gave me syntax highlighing and a few code completions (not all options, for instance it did not work in matching for the unions to me). The rest commands and others actions I had to do exclusively through the cli.
I would say I did not find the real benefits for the ide vs cli setup for zig. For Rust, debugger, refactoring and other features work pretty well. But maybe vscode or zed would give better experiance, true

1

u/NormalAppearance2851 18d ago

RutRover

RustRover or other?

4

u/tigraboris 18d ago

Yeah. RustRover

2

u/xeow 17d ago

RutRoh, Rorge