<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/four-months-of-zig-ymbls4tv0" -->

---
title: Four Months of Zig | daily.dev
description: A developer reflects on four months of using Zig after returning to it from Rust. She praises Zig's explicit allocator and IO parameters, its build system...
canonical: https://daily.dev/posts/four-months-of-zig-ymbls4tv0
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Four Months of Zig | daily.dev
og:description: A developer reflects on four months of using Zig after returning to it from Rust. She praises Zig's explicit allocator and IO parameters, its build system...
og:url: https://daily.dev/posts/four-months-of-zig-ymbls4tv0
og:image: https://api.daily.dev/og/posts/YmBLs4tv0.png
og:image:alt: Four Months of Zig
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Four Months of Zig

**[Hacker News](https://daily.dev/sources/hn)** · 15 min read · 15 upvotes · 1 comments

## Summary

A developer reflects on four months of using Zig after returning to it from Rust. She praises Zig's explicit allocator and IO parameters, its build system (adopted by Uber for software written in other languages), comptime, and its lean dependency culture, where her projects have one or two direct dependencies and zero indirect ones versus dozens of indirect dependencies in Rust. Incremental compilation via 'zig build --watch -fincremental' currently only works on x86_64 Linux and macOS. She criticizes poor documentation, missing lifetime checks for stack-allocated buffers, lack of compile-time allocators for JSON parsing, and Zig's bootstrapping process that blocks Debian packaging. She still plans to keep using Zig as her go-to language for most projects.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://gracefulliberty.com/articles/four-months-of-zig>

## Questions this post answers

### Why does Zig require passing an allocator parameter to functions instead of using a global allocator?

Zig requires an explicit allocator parameter so it's clear whether a function allocates memory and which allocator it uses, making it hard to accidentally pass the wrong one. This lets developers switch between an arena allocator, a general purpose allocator, or a FixedBufferAllocator depending on the part of code, unlike languages with an implicit global or context-based allocator such as Odin.

_Weighing Zig's explicit allocators against Rust's model? daily.dev surfaces comparisons like this as they appear._

### What operating systems and architectures support Zig's incremental compilation with zig build --watch -fincremental?

Zig's incremental compilation currently only works on x86_64 Linux and macOS. Running 'zig build --watch -fincremental' makes the compiler watch for changes and rebuild only what changed, down to linking, making it fast enough to feel instant even on large codebases. Other operating systems or architectures don't yet have access to this feature.

_Tracking which platforms get Zig's faster build loops first? daily.dev keeps developers current on language tooling changes._

### Why can't Zig be packaged in Debian's official repositories?

Zig cannot be properly packaged by distributions like Debian because its bootstrapping process relies on a compiled WASM binary blob checked into the source rather than building fully from source. The Zig compiler's C++ version was replaced with a small WASM interpreter that compiles the full compiler to C, but no independent from-source bootstrap path exists yet.

_Choosing a language for a project with strict packaging requirements? daily.dev tracks ecosystem constraints like Zig's bootstrap story._

## Community take

How the wider developer community reacted, aggregated from 2 discussions and 103 comments across lobsters, hackernews (as of 2026-10-28).

**TL;DR:** Discussion is dominated by a long, technical debate over Zig's explicit allocator/IO passing versus Rust's RAII and arena allocator tradeoffs, alongside separate threads praising Zig's lean standard library and raising concerns about rapid breaking changes and vendored OS/crypto implementations.

**Sentiment:** 30% positive · 40% mixed · 30% skeptical

**The case for**

- The standard library bundles many things (JSON, HTTP, crypto, compression, binary format parsing) that Rust needs crates for, reducing dependency sprawl.
- Passing allocators explicitly makes library code more reusable and puts the caller in control of allocation strategy.
- Arena allocators simplify lifetime management by grouping allocations tied to a single logical scope like an HTTP connection.
- The explicit IO interface is seen as a clean separation of concerns that makes porting to new operating systems mostly about porting IO.

**The pushback**

- Some find mandatory allocator-passing an aesthetic preference rather than a practical necessity, arguing modern RAII/ownership models handle memory fine without manual arena management.
- Arenas have footguns, like unbounded growth if not scoped carefully, and aren't always faster than malloc implementations like mimalloc.
- Zig's reimplementation of standard libraries (crypto, compression, Windows NT internals) instead of using existing battle-tested ones is viewed as risky and likely to trigger antivirus false positives.
- Zig's frequent breaking changes make it a chore to keep projects up to date, especially with multiple dependencies.
- Zig's composable error model discards diagnostic/location information compared to Rust's richer, composable error types.

**By community**

- lobsters (positive): Mostly constructive agreement that Rust's dependency culture is a real pain point, with some pushback and nuance on panics versus explicit error bubbling in Zig.
- hackernews (heated): A long, contentious back-and-forth over whether explicit allocators and arenas are genuinely better than RAII/garbage collection, plus separate skepticism about Zig reimplementing OS and crypto internals.

**Hottest debate:** Whether Zig's explicit allocator/arena-passing is a genuinely superior design or just an aesthetic preference compared to RAII and automatic memory management.

**Open questions**

- How much of the four-month experience was spent dealing with breaking changes versus learning the language itself?
- How should arena size limits be chosen for things like HTTP request handling to avoid denial-of-service risk?
- Will antivirus vendors adapt to Zig's low-level Windows API usage, or will this remain a barrier to adoption?

**Highlights**

> > If you don't like arenas then that will push you towards avoiding allocations I mean push in the sense of a pit-of-success, not making me do things because the alternative is unpalatable. > managing frees one-to-one with allocations is a nightmare It really isn't a nightmare if your language has tools to help you. I'm never particularly concerned about frees in Rust outside of thinking about room to optimize. > Need something to live across connections? Use the general purpose allocator for those particular things. Well, this is a determination you have to make very carefully and if you screw it up (like in the situation I was trying to outline) you have a subtle bug. > Personally I mostly lean on fixed-size buffers, but if I'm writing Zig it's just little toy programs where blowing up when the buffer runs out of room is fine. What's also fine is using malloc, which will have perfectly reasonable performance for your toy programs. This is reinforcing my belief that Zig programmers actually just have a sort of aesthetic attachment to the idea of managing their allocations themselves and this has very little to do with the actual practical concerns of writing software that works. I'm a lot more sympathetic to the other reply that talked about library code improving flexibility for those relying on the library, than this comment that only thinks about the case where everything goes perfectly and using a fixed size buffer for no reason.
> — [i2talics on hackernews · 2 comments](https://news.ycombinator.com/item?id=50267408)

> The article says some Zig advantages but it's worth noting that all these advantages are tradeoffs. Zig makes handling error easy but makes retaining error information hard. The result is that Zig developers either write more code than other languages to store diagnostic information, or just simply discard diagnostic information. The second makes it much harder to debug because the useful error information is discarded. About the TigerStyle, it's worth noting that TigerBeetle doesn't even support variable-sized string type. You can store fixed-sized data, such as a string that's at most 32 bytes. What if the order information contains string longer than 32 bytes? Then you need to store that string in antoher database. TigerBeetle is not a general database. Static memory allocation doesn't fit most applicaitons. The fallable allocation is useful in embedded system and OS development etc., but useless in common application programming, because OOM results in crash rather than failed allocaiton.
> — [delifue on hackernews · 1 comments](https://news.ycombinator.com/item?id=50268628)

> From the link: > > Won't this get flagged by anti-virus scanners as suspicious? > Unfortunately, yes. We consider this a problem for the anti-virus scanners to solve. I am suddenly less interested in relying on Zig.
> — [dwattttt on hackernews · 1 comments](https://news.ycombinator.com/item?id=50269741)

> This is answered in the article. It boils down to: - Most dependencies have many more dependencies - Rust's standard library doesn't include essential functionality that many projects depend on It's possible but painful to make Rust work without large dependency trees. I do hope for the Rust ecosystem to make strides in a better direction here like they are in other places. Zig avoids both through dependency culture and having basic stuff like error handling and serialization in the language or standard library.
> — [liberty on lobsters · 14 points, 2 comments](https://lobste.rs/s/qr59sa/four_months_zig#c_rqzdr7)

> We used to have a version of ArrayList that bundled an allocator in the stdlib, we removed it because our experience having written Zig code for a few years led us to reach for the allocator-less variant almost always. One aspect your argument is missing is that if you are juggling many ArrayLists,  having each bundle its own copy of the allocator (instead of storing it just once) means wasting 16 bytes per ArrayList. The allocator-less variant is simply more flexible in that regard.
> — [kristoff\_it on hackernews](https://news.ycombinator.com/item?id=50271068)

**Source threads**

- [lobsters](https://lobste.rs/s/qr59sa/four_months_zig) · 57 points · 11 comments
- [hackernews](https://news.ycombinator.com/item?id=50265128) · 132 points · 92 comments

## Community discussion

Top comments from developers on daily.dev.

**@khauma** · 0 upvotes

> I can't quite put my finger on it but this was an odd read. Something seemed off...

## Similar posts on daily.dev

- [How Our Rust-to-Zig Rewrite is Going](https://daily.dev/posts/how-our-rust-to-zig-rewrite-is-going-kvdc7iim2) · Lobsters · 5 upvotes · 1 comments
- [Returning to Zig](https://daily.dev/posts/returning-to-zig-c4quzonya) · Lobsters · 23 upvotes · 4 comments
- [Devlog ⚡ Zig Programming Language](https://daily.dev/posts/devlog-zig-programming-language-erdncfswa) · Zig · 0 upvotes · 0 comments
- [Zig creator seeks 'uncompromising perfection' before blessing 1.0](https://daily.dev/posts/zig-creator-seeks-uncompromising-perfection-before-blessing-1-0-xjndfdjvj) · DEVCLASS · 28 upvotes · 13 comments

---

Tags: [#rust](https://daily.dev/tags/rust), [#zig](https://daily.dev/tags/zig)

[View this post on daily.dev](https://daily.dev/posts/four-months-of-zig-ymbls4tv0)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Four Months of Zig","url":"https://daily.dev/posts/four-months-of-zig-ymbls4tv0","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/four-months-of-zig-ymbls4tv0"},"datePublished":"2026-10-28T00:14:51.345Z","dateModified":"2026-10-28T11:01:33.866Z","description":"A developer reflects on four months of using Zig after returning to it from Rust. She praises Zig's explicit allocator and IO parameters, its build system...","image":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","thumbnailUrl":"https://media.daily.dev/image/upload/s--foaA6JGU--/f_auto/v1722860399/public/Placeholder%2004","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":1,"discussionUrl":"https://daily.dev/posts/four-months-of-zig-ymbls4tv0","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":15},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":1}],"keywords":"rust,zig","timeRequired":"PT15M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"Four Months of Zig"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/four-months-of-zig-ymbls4tv0","comment":[{"@type":"Comment","text":"I can’t quite put my finger on it but this was an odd read. Something seemed off…","datePublished":"2026-10-28T00:44:57.872Z","dateModified":"2026-10-28T00:48:03.948Z","url":"https://daily.dev/posts/YmBLs4tv0#c-alwoIwOFC","author":{"@type":"Person","name":"Kahlil Wallace","url":"https://daily.dev/khauma","image":"https://media.daily.dev/image/upload/s--QvppE9Ip--/f_auto/v1767378558/avatars/avatar_7eQFeSQRDx0muV3n92gxT?_a=BAMAK+ZW0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/four-months-of-zig-ymbls4tv0#faq","mainEntity":[{"@type":"Question","name":"Why does Zig require passing an allocator parameter to functions instead of using a global allocator?","acceptedAnswer":{"@type":"Answer","text":"Zig requires an explicit allocator parameter so it's clear whether a function allocates memory and which allocator it uses, making it hard to accidentally pass the wrong one. This lets developers switch between an arena allocator, a general purpose allocator, or a FixedBufferAllocator depending on the part of code, unlike languages with an implicit global or context-based allocator such as Odin. Weighing Zig's explicit allocators against Rust's model? daily.dev surfaces comparisons like this as they appear."}},{"@type":"Question","name":"What operating systems and architectures support Zig's incremental compilation with zig build --watch -fincremental?","acceptedAnswer":{"@type":"Answer","text":"Zig's incremental compilation currently only works on x86_64 Linux and macOS. Running 'zig build --watch -fincremental' makes the compiler watch for changes and rebuild only what changed, down to linking, making it fast enough to feel instant even on large codebases. Other operating systems or architectures don't yet have access to this feature. Tracking which platforms get Zig's faster build loops first? daily.dev keeps developers current on language tooling changes."}},{"@type":"Question","name":"Why can't Zig be packaged in Debian's official repositories?","acceptedAnswer":{"@type":"Answer","text":"Zig cannot be properly packaged by distributions like Debian because its bootstrapping process relies on a compiled WASM binary blob checked into the source rather than building fully from source. The Zig compiler's C++ version was replaced with a small WASM interpreter that compiles the full compiler to C, but no independent from-source bootstrap path exists yet. Choosing a language for a project with strict packaging requirements? daily.dev tracks ecosystem constraints like Zig's bootstrap story."}}]}
```

