A developer who publishes under the handle besok ported a JSONPath query library from Rust to Zig to compare the languages directly, according to a post on their blog. They said they have seven years of Rust experience, giving the comparison an informed baseline.

The rewrite came out flatter: the Zig version used four files where the Rust original used more than a dozen nested ones, because Zig's import system adds enough friction to discourage deep folder hierarchies, the developer wrote. They took that as evidence that some of Rust's typical file structure is convention rather than necessity.

Zig lacks Rust's ownership-driven iterator and combinator patterns, pushing the port toward in-place mutation and imperative code, which the developer found expensive to replicate in memory management and manual bookkeeping compared with Rust's compiler-enforced approach. Zig's testing allocator caught four distinct categories of memory bugs during the port: a forgotten deinit call, skipped cleanup on an error path, a double free and an orphaned allocation, each a class of error Rust's borrow checker rejects before the code compiles.

Tooling and libraries were thinner going in, the post said: Zig's IDE support lags well behind Rust's, forcing more reliance on the command line, and even Zig's regex library lacks the Unicode support the project needed for full compliance with the JSONPath standard, RFC 9535.

One developer's port of one library is a data point, not a verdict, but it is a rare apples-to-apples one: the same person, the same project, the tradeoffs made explicit. Zig trades a compiler that blocks a class of memory bugs for a runtime allocator that catches them instead, and this is what that trade cost in practice.