Loris Cro
kristoff.it · Personal blog · on HN since 2019
Loris Cro, of the Zig Software Foundation, writes about Zig's async, comptime, compiler direction, and open source project governance.
What HN saysHN links it for explanations of Zig's colorless async and for the project's policy against AI-generated contributions, which commenters cite as mostly negative for them.
105HN people shared it
66linked it in comments
101stories submitted
4.5Kstory points
3 months agolast shared
2019people per year2026
Most-shared posts
- 1What Is Zig's “Colorblind” Async/Await?25 people · 94 points · first shared 2020 · 26 comments on HN
- 2What Is Zig's Comptime?14 people · 152 points · first shared 2019 · 40 comments on HN
- 3Contributor Poker and Zig's AI Ban12 people · 13 points · first shared 2026 · discussion on HN
- 4Zig's New Relationship with LLVM10 people · 450 points · first shared 2020 · 284 comments on HN
- 5Zig's New Async I/O10 people · 385 points · first shared 2025 · 281 comments on HN
- 6Maintain It with Zig8 people · 442 points · first shared 2021 · 278 comments on HN
- 7Zig Is Self-Hosted Now, What's Next?5 people · 303 points · first shared 2022 · 150 comments on HN
- 8Playing the Open Source Game5 people · 219 points · first shared 2021 · 72 comments on HN
- 9Why Go and Not Rust?4 people · 548 points · first shared 2019 · 477 comments on HN
- 10RAII and the Rust/Linux Drama4 people · 107 points · first shared 2024 · 132 comments on HN
- 11Source-Code Availability and How I Became Radicle-Ized4 people · 17 points · first shared 2026 · discussion on HN
- 12The First Zig Website Redesign4 people · 14 points · first shared 2021 · discussion on HN
- 13Advent of Code in Zig4 people · 8 points · first shared 2024 · discussion on HN
- 14Interfacing with Zig, a BDFL-run project3 people · 166 points · first shared 2021 · 2 comments on HN
- 15The Python Package Index Should Get Rid of Its Training Wheels3 people · 92 points · first shared 2024 · 103 comments on HN
What HN people wrote when they linked it
kristoff_it · 2026-05-15
The no-AI policy of the Zig compiler project is for the compiler, other projects can do whatever they want.
Bun's fork of Zig was just an unsound hack that at best would have produced a strictly inferior speedup compared to our current work with incremental compilation, which is already plenty usable:
- June 2025 core team starts using it with the zig compiler itself
https://ziglang.org/devlog/2025/#2025-06-14
- April 2026 https://ziglang.org/devlog/2026/#2026-04-08
> Zig's AI stance is ridiculous & politically-motivated
It's literally an issue with our business model to mess with our contributor pipeline, can't get more concrete than this.
https://kristoff.it/blog/contributor-poker-and-ai/
branko_d · 2026-04-30
From https://kristoff.it/blog/contributor-poker-and-ai/:
"Unfortunately the reality of LLM-based contributions has been mostly negative for us, from an increase in background noise due to worthless drive-by PRs full of hallucinations (that wouldn’t even compile, let alone pass CI), to insane 10 thousand line long first time PRs. In-between we also received plenty of PRs that looked fine on the surface, some of which explicitly claimed to not have made use of LLMs, but where follow-up discussions immediately made it clear that the author was sneakily consulting an LLM and regurgitating its mistake-filled replies to us."
stephenlf · 2025-08-01
This is great. I see immediate use in better Async/Await ergonomics. Zig was making rounds recently for their new async semantics [1], in which functions with an element of concurrency request a reference to a concurrent executor (the IO interface). The advantage is that you can drop the red/blue syntax. Plus, you can load your IO interface as a global const and reference it from anywhere without passing around a variable everywhere.
I see context variables as a step up from that. You can specify a dependency on some concurrent runtime environment (?async) and run with that.
[1] https://kristoff.it/blog/zig-new-async-io/
nine_k · 2025-07-24
But AFAICT in Zig you don't have to have async and sync versions. Instead, the runtime may choose to interpret `try` as an async or as a synchronous call, the latter is equivalent to a future / promise that resolves before the next statement [1]. This is a sane approach.
Having separate sync / async versions that look like the same function is a great way to introduce subtle bugs.
[1]: https://kristoff.it/blog/zig-new-async-io/
josephg · 2023-06-05
Its certainly possible with compiler magic. Zig does exactly that - where functions can be colorless and they work slightly differently in async and syncronous contexts, doing the obvious thing in both cases. I'm not sure how well it works in practice (I haven't spent enough time with zig to know). I'd worry that bugs would creep in to whichever variant of the function you aren't exercising.
Its a lovely design though.
https://kristoff.it/blog/zig-colorblind-async-await/
gregwebs · 2022-06-03
Haskell has always been the best. Go's did the same as Haskell. In either case IO is automatically async. If you want concurrency you create very light weight threads. This approach works very well for most use cases, but when you want the best performance possible the light weight threads can still be too much. Zig is going for a lowest possible overhead approach like Rust but has an interesting take: https://kristoff.it/blog/zig-colorblind-async-await/
kbd · 2021-04-26
I really can't agree with this premise after seeing how Zig implements color-less async/await:
https://kristoff.it/blog/zig-colorblind-async-await/
I highly recommend watching Andrew Kelley's video (linked in that article) on this topic:
https://youtu.be/zeLToGnjIUM
PoignardAzur · 2021-02-23
I wonder how rui314's assertion that incremental linking is a poor tradeoff squares with Zig's decision[1] to build its own linker with "in-place binary patching".
I assume part of the difference is that Zig has complete control over its environment, whereas Mold is trying to be a general-purpose linker, but still, I wonder if there's some insight to be gained from crosspollination there.
(like, maybe Mold could have an "--incremental" option with associate documentation explaining that this option is only beneficial if the input object files follow some specific guidelines)
[1] https://kristoff.it/blog/zig-new-relationship-llvm/
jedisct1 · 2020-12-23
> One is they make your functions colored; async functions world best with other async functions while normal blocking functions work best with other blocking functions.
Not in Zig: https://kristoff.it/blog/zig-colorblind-async-await/
Zambyte · 2025-12-03
My prompt: tell me about the new zig io interface
Ecosia:
> The Zig IO interface is associated with Zigbee, a specification for a suite of high-level communication protocols using low-power digital radios. It is often used in IoT (Internet of Things) applications for smart home devices, such as lights, sensors, and smart locks. The Zig IO interface typically allows for seamless communication between devices, enabling automation and remote control.
> For specific details about the latest updates or features of the Zig IO interface, I recommend checking the official Zigbee Alliance website or relevant tech news sources for the most current information. If you're interested in sustainable technology or eco-friendly smart home solutions, feel free to ask!
Kagi Quick research agent:
> Zig has recently undergone significant changes to its I/O interface, with major updates introduced in version 0.15 and further enhancements planned for the upcoming 0.16.0 release. The new I/O system represents a comprehensive rework of the standard library's input/output handling, focusing on improved efficiency, clarity, and flexibility.
> The most notable changes include a complete overhaul of the `std.Io.Reader` and `std.Io.Writer` interfaces, which were revamped in a mid-2025 development release as the first step in modernizing Zig's I/O capabilities [^2]. These interfaces in Zig 0.15.1 represent a significant improvement in both efficiency and code clarity, though they require slightly…
Jach · 2025-11-27
Their "VP of Community" wrote this in 2020: https://kristoff.it/blog/addio-redis/ I didn't come across it until 2022. Still, particularly that and other writing from him and others convinced me the Zig community is full of goobers. That's not so bad, I have my tastes in immature humor and can sometimes be a goober too, but the application in that post's clearly-marked over-the-top skit still is just bizarre and doesn't encourage me to interact with them. To be more fair to the author and the community though, especially with respect to this GitHub migration, his more serious writing is better: https://kristoff.it/blog/the-open-source-game/ (2021). Some nice things said about Rust and the Rust community, even. In that he outlines a core position of "software you can love" being what he wants to create and inspire people to create, and how tents like "big tech" and "open source" don't really cater to that. The migration off of GitHub is predictable in the sense that GitHub stopped being something a lot of people loved a while ago -- of course some still love it, this tent creates obvious tension. (Though I don't know that Codeberg is any better and worthy of love. A few libraries I use have migrated to it and it seems fine at least, though them using Anubis is annoying and I've gotten the fail page of "Internal Server Error: administrator has misconfigured Anubis." a number of times. It does not spark joy in me.)
dgb23 · 2024-07-30
> For example, the recommended way to start a project, with `zig init`, has a load of code that I really don't need when I just want a bare project to get started.
I recently started a new project. zig-init provides you with a working build.zig file and two very minimal project files under /src, one of which is a hello world binary and the other is a hello world library.
> Also I've had a lot of issues getting editor integration to work correctly.
ZLS is not at the same level of what you would expect from a more mature language. For example by default it will not help you with anything related to comptime.
I highly recommend reading this fairly recent blog post by Loris Cro:
https://kristoff.it/blog/improving-your-zls-experience/
It explains how you set up your build.zig and ZLS (a few lines of configuration) in order to get much more help from ZLS. It will then perform the equivalent of what `cargo check` (Rust) does.
jorangreef · 2023-06-28
Hey, Joran from TigerBeetle here!
You raise a fair question.
Coincidentally, one of the reasons we picked Zig was for how readable it was, and strikingly so, even for high level programmers who might not understand systems programming or C. Because Zig reads like TypeScript, and we were working in payment switches where the majority of programmers could read that. This particular switch, in fact, had this same business requirement, that programmers should be able to at least read the systems language.
But generally, our experience has been that people who understand C will understand how to maintain Zig [0]. Zig's toolchain is also more accessible, and across all platforms. Zig's compiler is already being used by Uber for hermetic builds.
It's also easy to learn. You can pick up Zig in a week and be comfortable in a month. Zig has a simple grammar. I love how, when we have someone join the team, we never have a discussion about how to learn Zig, as if it's a difficult language to master (like C++!). Rather, there's excitement around learning the language, even ahead of starting at work, and within a day or two they're committing.
We made this decision for TigerBeetle in July 2020, and didn't take it lightly. We had already followed Zig's progress for 2 years by that point, and many factors were considered [1][2][3]. C was the other contender, given that we had to handle memory allocation failure.
The crux of the decision, then, was whether to invest in a systems…
verdagon · 2022-07-22
> Nice balanced writeup! However, I am not convinced one can make something solving all the things Rust solves which is substantially simpler as language.
I used to think this too, but my opinions have evolved a bit.
Recall the transition from goto-heavy assembly code to C; it solved all the things assembly solved, and was a substantially simpler language. One of the keys to designing a good language (or any good abstraction, really) is to identify the patterns that already informally exist.
So if we want to see a simpler Rust, we need to look at the informal patterns that exist in Rust.
* Zig did this with Rust's async/await, by making it colorblind. [0]
* Vale did this with Rust's generational indices, by making generational references, a way to get memory-safe single ownership without a borrow checker. [1] It then adds a hardened FFI boundary to get more solid safety guarantees than Rust could. [2]
* HVM did this for Haskell by looking at Rust's particular blend of borrowing and cloning, and making it happen automatically. [3]
* Lobster did something similar for an imperative mutable language, to reduce RC costs lower than ever before. [4]
I think Rust is an amazing first attempt at an interesting new problem space, and a huge step forward for the field. Now, language designers are starting to notice that the building blocks that Rust trailblazed might be combined in new interesting ways, to make new interesting languages.
It's an exciting time for programming…
mihaelm · 2026-05-30
They're probably refering to their strict "No LLM / No AI" policy:
https://codeberg.org/ziglang/zig/src/branch/master/README.md#strict-no…
which applies to contributing to the Zig project.
The "contributor poker" blog post should probably be a required reading to understand where it comes from:
https://kristoff.it/blog/contributor-poker-and-ai/
"Anti-AI stance" is painting it with too broad of a brush. You're definitely not breaching any CoC or whatever by using AI for your Zig projects.
frangonf · 2026-05-14
They also said that:
> Code origin was not even a factor [0]
> AI is entirely besides the point here. The changes in this Zig fork are not desirable to upstream for several reasons. [1]
So my view here is that besides AI policies to filter low value contributions and "contributor poker" [2] to attract contributors vs just contributions, a well thought of genious implementation aligned with the Zig roadmap instead of the "hacky implementation for a flashy headline" [1] would have made the cut.
But then again this entertaining drama will sadly get deprecated by mid 2027 as the datacenters will be churning out their own opusrust and clankzig.
[0] https://news.ycombinator.com/item?id=48017255
[1] https://ziggit.dev/t/bun-s-zig-fork-got-4x-faster-compilation-times/15…
[2] https://kristoff.it/blog/contributor-poker-and-ai/
tkel · 2026-05-08
Zig devs can run Mythos same as anyone else can. I think you are failing to understand the reasoning behind their decision. It's about contributors, not contributions.
https://kristoff.it/blog/contributor-poker-and-ai/
neomantra · 2026-05-05
One non-obvious reason is that an important aspect of their community is to shepherd new contributors [1]. LLMs crushing everything would reduce that. More obvious is all the toil for maintainers dealing with LLM PRs (broadly it’s an issue). The Zig maintainers prefer to put their energy into improving people and fostering those relationship.
[1] https://kristoff.it/blog/contributor-poker-and-ai/
maccard · 2026-04-30
The post that inspired this post [0] says:
> So while one could in theory be a valid contributor that makes use of LLMs, from the perspective of contributor poker it’s simply irrational for us to bet on LLM users while there’s a huge pool of other contributors that don’t present this risk factor.
> The people who remarked on how it’s impossible to know if a contribution comes from an LLM or not have completely missed the point of this policy and are clearly unaware of contributor poker.
The point isn't about the 3000 line PR, it's about do we think the submitter is going to stick around.
[0] https://kristoff.it/blog/contributor-poker-and-ai/
mapontosevenths · 2026-04-30
> unless it's coming from a known and trusted developer.
That's exactly the sketchy part here. They turned down known, working and tested, code that came from a partner (bun) due to this policy. Code that 4x'd compile speed.
A general ban makes sense based on their rationalization ("contributor poker"[0]). A total and inflexible ban can lead to a worse outcome for everyone though.
If a senior, experienced, contributor vouches for the code it shouldn't matter if they hand crafted it on stone tablets, generated it with yarrow sticks, or used gpt-3.
[0] https://kristoff.it/blog/contributor-poker-and-ai/
maleldil · 2026-02-15
Here[1]. This mentions async, but it affects every single use of IO functions.
[1] https://kristoff.it/blog/zig-new-async-io/
int_19h · 2025-10-31
This blog post had a better explanation than the one linked from the story IMO:
https://kristoff.it/blog/zig-new-async-io/
jadbox · 2025-10-27
Semi-unrelated, but async is coming soon to Zig. I'm sorta holding off getting deep into Zig until it lands. https://kristoff.it/blog/zig-new-async-io/
mirashii · 2025-08-23
> Maybe, or maybe the fact that Zig is a small independent project with limited resources has also something to do with it
Or, maybe it's this kind of redirection and evidence of a victim complex. Part of the reason that there's a patina of anti-Rust sentiment includes the dismissive attitude and swipes you, a the VP of Community at the Zig Software Foundation, take towards Rust and Rust developers by writing about topics you aren't involved in and don't have a solid grasp of.
https://kristoff.it/blog/raii-rust-linux/ https://lobste.rs/s/hxerht/raii_rust_linux_drama#c_gbn1q8
Or similarly, comments like this one in this thread: https://news.ycombinator.com/context?id=44994749
signa11 · 2024-12-01
if you want to use Zig, here are some tips : https://kristoff.it/blog/advent-of-code-zig/
king_geedorah · 2024-11-10
Zig does not have an IDE, but it does have a language server called zls[0] that I have found to be pretty decent after implementing Loris' suggestion from this post[1].
[0] - https://github.com/zigtools/zls
[1] - https://kristoff.it/blog/improving-your-zls-experience/
rererereferred · 2024-10-24
Zig was[0] going to make functions "colorblind" by not needing the function to be declared differently. Just a configuration in your root file[1]
[0] I say was because I don't know the current status of async in zig or if it will come back in the future. [1] https://kristoff.it/blog/zig-colorblind-async-await/
rofrol · 2024-10-24
kristoff wrote the same about performance
> More generally, RAII is a feature that exists in tension with the approach of operating on items in batches, which is an essential technique when writing performance-oriented software.
> And it doesn’t end here: operating in batches by using memory arenas, for example, is also a way to reduce memory ownership complexity, since you are turning orchestration of N lifetimes into 1.
> In this video Casey Muratori describes how going from thinking about individual allocations to thinking in batches is a natural form of progression for a programmer.
> Extremely popular talk on the advantages of looking at problems as data transformation pipelines, where Mike Acton shows how common approaches in C++ (RAII being one of them) are antithetical to the goal of creating performant code.
https://kristoff.it/blog/raii-rust-linux/
winter_blue · 2024-10-02
Are you referring to the Zig compiler switching to become self hosted [1], or the Zig website switching to becoming self hosted [2]? (I assume the latter.)
[1] https://kristoff.it/blog/zig-self-hosted-now-what/
[2] https://ziglang.org/news/migrate-to-self-hosting/
teknico · 2024-03-27
Well, it depends. If your project uses Zig, you obviously use the Zig build system.
If your project uses C or C++, you also use the Zig build system.
Advocacy - Maintain it With Zig:
https://kristoff.it/blog/maintain-it-with-zig/
HN discussion:
https://news.ycombinator.com/item?id=35566791
Reference:
https://ziglang.org/learn/build-system/