Zig Libc
ziglang.org237 points by ingve 15 hours ago
237 points by ingve 15 hours ago
250 C files were deleted. 2032 to go. Watching Zig slowly eat libc from the inside is one of the more satisfying long term projects to follow
That's something I've always admired about Zig.
A lot of languages claim to be a C replacement, but Zig is the second language I've seen that seemed like it had a reasonable plan to do so at any appreciable scale. The language makes working with the C ABI pretty easy, but it also has a build system that can seamlessly integrate Zig and C together, as well as having a translate-c that actually works shockingly well in the code I've put through it.
The only thing it didn't do was be 99% compatible with existing C codebases...which was the C++ strategy, the first language I can think of with such a plan. And frankly, I think Zig keeping C's relative simplicity while avoiding some of the pitfalls of the language proper was the better play.
D can import C files directly, and can do C-source to D-source translation.
D can compile a project with a C and a D source file with:
dmd foo.d bar.c
./fooThat just reminds me anyone know whether rust has something similar? Not wanting to start any Rust v. Zig debate. I am just wanting to be even more independant when it comes to some of my Rust projects.
There is a couple libc implementations:
- c-ward [0] a libc implementation in Rust
- relibc [1] a libc implementation in Rust mainly for use in the Redox os (but works with linux as well)
- rustix [2] safe bindings to posix apis without using C
[0]: https://github.com/sunfishcode/c-ward
Does this mean long term Zig won’t run on OpenBSD?
Because doesn’t OpenBSD block direct syscalls & force everything to go through libc.
This affects static libc only. If you pass -dynamic -lc then the libc functions are provided by the target system. Some systems only support dynamic libc, such as macOS. I think OpenBSD actually does support static libc though.
> I think OpenBSD actually does support static libc though.
How does that work, with syscalls being unable to be called except from the system’s libc? I’d be a bit surprised if any binary’s embedded libc would support this model.
For static executables, “the system’s libc” is of course not a thing. To support those, OpenBSD requires them to include an exhaustive list of all addresses of syscall instructions in a predefined place[1].
(With that said, OpenBSD promises no stability if you choose to bypass libc. What it promises instead is that it will change things in incompatible ways that will hurt. It’s up to you whether the pain that thus results from supporting OpenBSD is worth it.)
> How does that work, with syscalls being unable to be called except from the system’s libc?
OpenBSD allows system calls being made from shared libraries whose names start with `libc.so.' and all static binaries, as long as they include an `openbsd.syscalls' section listing call sites.
Not all of libc is syscalls. E.g. strlen() is zib libc but open() goes to system libc.
Sorry I got mixed up with FreeBSD: https://codeberg.org/ziglang/zig/issues/30981 (original github link has more information)
This is very exciting for zig projects linking C libraries. Though I'm curious about the following case:
Let's say I'm building a C program targeting Windows with MinGW & only using Zig as a cross compiler. Is there a way to still statically link MinGW's libc implementation or does this mean that's going away and I can only statically link ziglibc even if it looks like MinGW from the outside?
This use case is unchanged.
If you specify -target x86_64-windows-gnu -lc then some libc functions are provided by Zig, some are provided by vendored mingw-w64 C files, and you don't need mingw-w64 installed separately; Zig provides everything.
You can still pass --libc libc.txt to link against an externally provided libc, such as a separate mingw-w64 installation you have lying around, or even your own libc installation if you want to mess around with that.
Both situations unchanged.
That's cool. I imagine I could also maintain a MinGW package that can be downloaded through the Zig package manager and statically linked without involving the zig libc? (Such that the user doesn't need to install anything but zig)
That's a good way to sell moving over to the zig build system, and eventually zig the language itself in some real-world scenarios imo.
do you suspect it will be possible to implement printf??
while we're talking about printf, can i incept in you the idea of making an io.printf function that does print-then-flush?
It's completely possible to implement printf. here is my impl (not 100% correct yet) of snprintf for my custom libc implemented on top of a platform I'm working on <https://zigbin.io/ab1e79> The va_arg stuff are extern because zig's va arg stuff is pretty broken at the moment. Here's a C++ game ported to web using said libc running on top of the custom platform and web frontend that implements the platform ABI <https://cloudef.pw/sorvi/#supertux.sorvi> (you might need javascript.options.wasm_js_promise_integration enabled if using firefox based browser)
yeah I just thought there are "compiler shenanigans" involved with printf! zig's va arg being broken is sad, I am so zig-pilled, I wish we could just call extern "C" functions with a tuple in place of va arg =D
The only thing C compilers do for printf, is static analyze the format string for API usage errors. Afaik such isn't possible in zig currently. But idk why'd you downgrade yourself to using the printf interface, when std.Io.Writer has a `print` interface where fmt is comptime and args can be reflected so it catches errors without special compiler shenigans.
Cool idea, for sure, but I can't help but wonder: for the code that's been ported, is there a concern that you'd have to perpetually watch out for CVEs in glibc/musl and determine if they also apply to the Zig implementations?
Yes but we already have to do that for our own standard library. For shared codepaths (e.g. math) it's strictly fewer potential bugs.
> It’s kind of like enabling LTO (Link-Time Optimization) across the libc boundary, except it’s done properly in the frontend instead of too late, in the linker
Why is the linker too late? Is Zig able to do optimizations in the frontend that, e.g., a linker working with LLVM IR is not?
Seems like it ought to be able to do inlining and dead code stripping which, I think, wouldn't be viable at link time against optimized static libraries.
It is viable against the IR that static libraries contain when LTO is enabled.
LTO essentially means “load the entire compiler backend into the linker and do half of the compilation work at link time”.
It’s a great big hack, but it does work.
As I understand it, compiling each source file separately and linking together the result was historically kind of a hack too, or at least a compromise, because early unix machines didn't have enough memory to compile the whole program at once (or even just hold multiple source files in memory at a time). Although later on, doing it this way did allow for faster recompilation because you didn't need to re-ingest source files that hadn't been changed (although this stopped being true for template-heavy C++ code).
Right, but I think that's what the question of "Why is the linker too late?" is getting at. With zig libc, the compiler can do it, so you don't need fat objects and all that.
---
expanding: so, this means that you can do cross-boundary optimizations without LTO and with pre-built artifacts. I think.
There are so many scary parts of libc, this is a really exciting project
There are many useful functions too. Like "memfrob" and "strfry". I hope the Zig libc makes those available too
Just joking of course. Those are sadly only in glibc.. :)
"Furthermore, when this work is combined with the recent std.Io changes, there is potential for users to seamlessly control how libc performs I/O - for example forcing all calls to read and write to participate in an io_uring event loop"
This is exciting! I particularly care more about kqueue but I guess the quote applies to it too.
Does Zig does have the man power to keep these up to date?
I think we either need to make operating systems not in C, or just accept that at some level we rely on C.
I’m sure this has crossed someone’s mind but why isn’t this called zlibc? :-)
Super cool project.
I expect a lot of C code may be quite mechanically translated to Zig (by help of LLMs). Unlike C->Rust or C->C++, where there's more of a paradigm shift.
There's solid reason for the translation here; the Zig core team is aiming to eliminate duplicated code and C functions, and avoid the need to track libc from multiple sources. In the future, LLMs could serve as part of this, but they are currently quite terrible at Zig (as far as I understand it, it's not a lack of Zig code samples, it's an imbalance of OLD Zig to NEW Zig, as Zig changes quite frequently).
You would need to consider if it is even worth it translating your C code. If the paradigm is identical and the entire purpose would be "haha it is now one language," surely you could just compile and link the C code with libzigc... In my opinion, it's not worth translating code if the benefit of "hey look one language" requires the cost of "let's pray the LLM didn't hallucinate or make a mistake while translating the code."
"Abolish ICE" at the bottom. Obviously a Bad Bunny fan, as I am.
The very same day I sat at home writing this devlog like a coward, less than five miles away, armed forces who are in my city against the will of our elected officials shot tear gas, unprovoked, at peaceful protestors, including my wife.
https://www.kptv.com/2026/01/31/live-labor-unions-rally-marc...
This isn't some hypothetical political agenda I'm using my platform to push. There's a nonzero chance I go out there next weekend to peacefully protest, and get shot like Alex Pretti.
Needless to say, if I get shot by ICE, it's not good for the Zig project. And they've brought the battle to my doorstep, almost literally.
Abolish ICE.
Please stay safe.
I can't hold it so had to create an account to share, I'm sorry. I'm one of the minor zig contributors, and I'm reading ziglang blog for the purpose of engagement in software engineering craft. I don't want to see these ICE stuff or whatever else political opinion you or somebody else have. I'm not from US and I barely know what ICE is but you're hating on people (I'm sure you think it's deserved, as with any hate) and I assume you may hate me at some point because I do something you don't share or like (like this comment for example). Thinking that creator of Zig may hate me, takes a lot of fun from using the language let alone contributing to it or areas surrounding it. What if tomorrow people with tattoos at particular spot will be hated in media and you'll be posting "Abolish people with tattoo". Not the best comparison, but I hope you got why I feel scared of engaging with community now.
I think you have big responsibility for maintaining community of people with different political opinions and you are definitely free to share it on your personal blog. But you chose to do it in the community driven project as a lead of that project. And it's not first time. It's a bit different. For me at least.
Also the fear is what made me create this new account, I'm not a bot or something like that. I'm just afraid due to many (political) reasons and I want to find peace in playing with computers and one of these safe places was just taken from me, which you probably have the right to do but you could've avoided it. You're not the only one. There are many projects like this who mention Gaza, Ukraine, Russia, Israel, all these stuff. It's getting less and less projects to engage with (again, for me, I think it works well for those projects as they attract people they like).
I'm sorry you have to suffer and see people deaths. Me too. I understand it's difficult to hold these stuff inside. As you can see I couldn't ether. But I hoped you're stronger than me.
Get some empathy and awareness. I’m not from the US either but I am against fascist thugs occupying cities. It’s not difficult.
Andy stay safe. We gotta all come to realization that none of this is possible if we let our democracy slip away. Millions before us died to preserve it. We owe it to them to put up a good fight.
My 85 year old mom lives in Portland and she attends rallies frequently. If you know of any way to support you or other local people doing this work, I'm very interested. My email is on my profile page.
I have a friend who is in Minneapolis. He's involved in caravans which are tracking ICE. He wasn't the driver in the last one. But, the ICE vehicle they tailed suddenly started going in a very direct path, instead of randomly driving. The driver figured it out first. They drove to the driver's house and then stood outside of their car for ten minutes staring at his house. Cars in Minnesota have their license plates on both the front and the back.
Is there any justification for that kind of intimidation? Did any of the Trump supporters vote for that? I hear about paid agitators on the left but not that kind of compensated actors. Is his name in a database now once they did the lookup?
[flagged]
The Department of Homeland Security was created in 2003. We didn't need it then and we don't need it now.
Why waste tax dollars on ineffective, privacy-violating security theater when we could spend it on education and health?
You didn't answer or even address a single question I asked. I'll ask again:
1. Are you OK with sovereign states enforcing their borders and deporting illegal immigrants?
2. Is it the awful tactics ICE uses to accomplish its mission, or do you find the mission in and of itself immoral?
ICE's current mission isn't to deport illegal immigrants. Its current mission is to antagonize anyone who is not a WASP, and seemingly these days, anybody who stands up for non-WASP citizens in the US. As can be easily ascertained by the sheer number of encounters where the officers insist that they don't actually care to see any papers proving the people they're arresting are legal US citizens (let alone legal US residents).
So your questions don't matter because you're arguing about a reality that doesn't exist.
You'd have a lot stronger argument if ICE wasn't being used as a secret police force. They're Immigration Enforcement in name only. Your average citizen would say it's okay to enforce immigration laws, there is no doubt about that; doing middle-of-the-night raids with a blackhawk helicopter in cities of your political opponents is not reasonable[0]. There are plenty more examples of their abhorrent behavior (like killing two American citizens in the midwest and brutalizing protestors) if you cared to search for it.
I've noticed that the MAGAs have been adamant about trying to shift the window back to: "but you agree that immigrants should be deported right?" as some sort of attempt to justify what's happening, I guess. Is that talking point coming from some popular right wing show or something as a last ditch effort before midterms?
0: https://www.propublica.org/article/chicago-venezuela-immigra...
Are you ok with the size of the budget these agencies control? Are you ok with it being headed by a guy who never has denied he took a $50k bribe from the FBI and wasn't even the initial target of an investigation?
I would bet you $1000 that not one of the immigrants being rounded up were even accused of that kind of corruption and crimes.
How is this not bald corruption and an insane way to spend tax dollars when people are really struggling in this country?
And I know plenty of restaurant owners in Portland that are closing because of down tourism. Why can Trump sue the IRS for $10B but Portland can't sue him for disparaging the city because he can't figure out that videos of riots are five years old?
The budget needs to increase because there are a lot of people in the country illegally and in order to get every single one of them out the agency needs to scale up. When people start obstructing officers and being violent that increases the required number of officers even more.
We don't need to get them all out, though. The vast majority are picking strawberries and working cheap construction jobs, not funneling drugs and guns.
I'm as concerned with getting them all out as I'm concerned with ticketing every jaywalker.
>The vast majority are picking strawberries and working cheap construction jobs,
This doesn't matter. I do not want the idea that someone can invade my country as long as they avoid drugs and guns to spread through the world. Due to how great America is people are going to want to come here even if they aren't allowed, so they must understand that coming here illegal will end badly for them so they fully understand not to come here illegally since it has negative EV for them.
> Due to how great America is
Well, not to worry then, hateful little attitudes like yours are rapidly undoing America's greatness. Soon noone will want to be there, including Americans.
Better start practicing your Chinese.
Enforcing the law is not a hateful attitude. If people don't want to be in a society that enforces laws they can feel free to go to some lawless society.
[flagged]
These few-minutes-old accounts swooping in on hot button issues to try persuade people are such a goddamn scourge, I wish there were something that could be done about it.
In the end I probably just need to leave HN for a while because it's really doing a number on what's left of my ability to trust what I read online.
Only thing you can do is flag them. Two strikes and they're gone. Plus usually, moderation give these accounts a perma-ban.
[flagged]
It is possible to both abolish ICE and CBP.
Especially as CBP officers commit crimes at a higher rate than undocumented migrants in the US: https://www.doomsdayscenario.co/p/accountability-for-ice-and...
In fact if you were to make a police force entirely out of CBP officers who have been arrested, it would be the fourth largest police force in America.
You don't get what the issue is?
Your account is 27 minutes old, the username is sarcastic at best, you hopped on specifically to defend the indefensible.
You really don't know?
> I wish there were something that could be done about it.
I find it helpful to think of HN like one would any other social media site. There are things they could be doing to curtail these sorts of accounts. They have apparently chosen not to.
[flagged]
When people like you finally realize what is happening in this country, I'm ready to quickly forgive and move on so that we can work together to preserve what freedoms we have left.
but please hurry... we really need you to pay attention and understand the reality that is upon us.
I do know what's happening. I've been around and watching for over a decade. We are bleeding from every orifice from an economic standpoint. The recent moves for deportations is an attempt by the office of the President to save face while not doing anything to fix over-spending, it's also a good vehicle for a surveillance push, and the RNC/old-school dems will be happy so someone like JD can take power afterwards to prop up the current rising oligarchy and further support British assets moving into the middle-east for "oil".
I'm not ignorant. I just know you aren't going to change anything by getting riled up emotionally and using language that indicates instability (I don't know you, my initial comment is because I don't want to see you get snuffed out). There's nothing you can do to solve these problems at this point and time, and they would prefer you protest so they can get your face, for the purposes of marking. Portland also is full of genuinely nutty people, been there several times and there is a real social contagion. You should be spending your time helping who you can, avoiding the authorities in general (never even speak to them), and understand that this "liberal democracy" is slowly collapsing and there's no stopping what's going to happen. We are being hollowed out entirely.
Freedoms aren't going to matter much when we are owned by every foreign nation but our own. I thought about 7 years ago that we could fix this with protesting, now I know that we can't. I'm just seeing this from a view of total loss while you see that there is yet still time.
Quick addendum: this is not me attempting to demoralize. I do think that once people can't pay for bread then maybe something will change. Up until that point the majority will give away every right for even the slightest relief, anything for a little hope of a better future. This has happened many times before. Empires rise and fall, it's nothing unique or out of the ordinary across history. First and foremost look out for yourself and your loved ones, and be willing to be flexible
Don't take the black pill.
Only white pilling for me sir. I believe in the morning light after a dark night. I just know that the tide comes in and out reliably. If you believe protesting is the way forward then go for it; just don't get shot while doing it.
Anyway; I like Zig a lot btw.. loving what you guys are doing.
> against the will of our elected officials
Did you mean your local officials?
In the Federal model of US government, state authority overrides centralized government except in the explicit cases enumerated by the Constitution.
So yes, of course they mean their local officials, because in this case there isn’t an explicit line in the Constitution explaining why the feds are allowed to invade Minnesota.
yep. It's not in the constitution, but in all practicality mcculloch vs maryland (which i would love to see repealed) disagrees
The Supreme Court has disagreed with you on the matter of federal immigration constitutional authority for more than a century. There isn’t any “invasion”; that’s a propaganda device.
And yet they didn’t brag about invading other states bordering, let’s see, Canada, just the blue one they had a political spat with.
That's clever. Just slap the "immigration sticker" on ICE and do whatever you want.
Don’t do it, your project here on zig is a much larger net positive for civilization than you spending your time at those protests.
<3 zig and want io interface in everything!
I too am sick of intrusion countermeasures electronics. Think of all the poor netrunners out there.
Well, I guess the Zig project is now writing in NTSC, causing compatibility issues for the PAL folks out there.
/s
[flagged]
It's kind of hilarious to call 2 single words at the end of a blogpost that you could have read over "pushing politics down your throat". As you said, you didn't even have an idea what it meant. For all you knew before you looked it up, he was complaining about the frigid winter weather.
Would you really make the same argument if those two words were “White power!” or something?
Programmers are curious by nature. So it's not 2 words; it's 2 words + wikipedia article + news articles about it, just to know what he's writing about. All uncalled for.
Be a little more curious then, friend. The author lives in Portland, which has been experiencing federal brutalization for months. Same place where the feds are repeatedly violating standards for warfare by using chemical munitions on civilians and engaging in large-scale misinformation campaigns against immigrants.
It’s almost astonishing how you found his statement “uncalled for”, while neglecting these facts.
https://www.theguardian.com/us-news/2026/feb/02/portland-ven...
The gall to tell someone what to create or not create, or say or not say with their own creation, for free for your own enjoyment.
[flagged]
“Woke”: objecting to murder
Nice attempt at gaslighting.
If Andrew only wrote “I object to murder” we wouldn't have this discussion. We're here because he wrote “Abolish ICE” instead. That's not denouncing murder, it's denouncing federal immigration law.
The woke don't object to murder. They cheered the murder of Charlie Kirk, they lamented the assassination attempts on Donald Trump because they _failed_, they celebrate Luigi Mangione as a martyr for their cause. Has Andrew ever used the Zig programming blog to condemn any of these (attempted) murders? I bet he hasn't—but feel free to prove me wrong!
So it's pretty clear that Andrew, just like most of the woke, doesn't object to murder. He loves murder. He only objects to democracy, to the rule of law, to the majority of Americans who don't support illegal immigration to the extent that he does.
If Andrew wants to use his programming language to take a stand against murder, he is welcome to do so! He has chosen to never do it. He has only used his platform to push woke politics, by supporting illegal immigration, and opposing law enforcement.
Objecting to murder is still politics, no? In fact, US republicans and democrats can't seem to agree who is fine to murder.
Republicans say that abortions are murder, but often also that prisoner executions are fine. Democrats tend to be in favor of abortions, but not of the death penalty.
I'm not making a moral judgement here, but I do want to ask. Is it just politics you don't agree with that you don't want Andrew to express?
Objecting to murder qua murder isn't political, since murder is defined as unjustified premeditated killing. The key word being _unjustified_: it's hardly political to oppose something that is unjustified by definition. The political aspect comes into play when people start to debate which killings are and aren't justified.
Your abortion example is a good one, so I will use it to clarify my point. When people say “abortion is murder!” they aren't just objecting to murder. They are asserting that abortion _is_ murder, actually: it's the political view that killing unborn foetuses is unjustified. The essential claim isn't “murder is bad”, but rather “abortion is bad”. So summarizing opposition to abortion as simply opposition to murder isn't accurate at all. It doesn't cut at the core of the objection.
The same situation exists with ICE. Modern societies grant the state a monopoly on violence, which the state delegates to officers who enforce the law of the land. When those officers use violence, it can be justified by virtue of them enforcing the monopoly on violence on behalf of the state, for the greater good. When a police officer shoots a gunman who attempts to kill civilians, few people would call that murder: after all, the killing is justified. Sometimes, law enforcement officers kill people when it's questionable whether it is justified. Labeling the killing as “murder” or “not murder” is then a political position: you aren't making a specific statement about murder (again, almost everyone agrees that murder is bad), but you're insisting that killing a person in such-or-such a situation is (not) justified.
So yes, insisting that the recent ICE killings of left wing activists constitute murder is a political statement: it's asserting that this ostensibly justified use of state violence was not justified in this case. Which is a point you can plausibly make, but you cannot insist it's not political, because determining which types of killings are justified and which are not is intrinsically a matter of publicy policy, i.e., political.
> Is it just politics you don't agree with that you don't want Andrew to express?
Ideally, I would not want Andrew to express any political views, at least not in his capacity of Zig project leader. I prefer open source projects that are maximally inclusive, which means not enforcing contributors to conform with particular political views.
Of course there is no law that says open source projects must be inclusive of political views, so you can create an open source project just for people who have the same political views as you do, but then I think the decent thing to do is at least be honest about it.
If Andrew thinks Zig is an American Democratic software project, he should clearly label it as such on ziglang.org. And then I also think Hacker News should ban him when he makes posts where he takes political stances, since Hacker News explicitly has a policy that opposes politics. If Andrew doesn't think Zig is just for American Democrats, he should refrain from making political posts on the Zig language blog. He can still go to his anti-ICE rally and post about it on his personal Bluesky account or whatever, but that at least makes it clear those are his personal political views, and they are not part of the Zig project.
Of course, I cannot enforce either of those things. They are just my personal preferences.
Denouncing ICE is not denouncing federal immigration law. The Department of Homeland Security did not exist until 2003. Are you saying that prior to 2003, the US did not enforce federal immigration law?
What's your point? Immigration law existed before 2003 too. It might not have been the DHS or ICE enforcing it, but the concept of illegal aliens wasn't invented in 2003.
And yes, I interpret “Abolish ICE” to mean “don't enforce federal immigration law”, because that's what people _usually_ mean when they say “abolish ICE”.
Technically, “abolish ICE” could also mean: “abolish ICE and replace it with an even more ruthless state secret police modeled after the East German Stasi” but in my experience that's _rarely_ what people who say “abolish ICE” mean. So I don't think you can fault me for assuming, in good faith, that's not what Andrew means when he calls for the abolition for ICE, either.
If Andrew feels I'm misconstruing his intent, then he's welcome to write a full blog post explaining his nuanced views on immigration, but he didn't do that. He only wrote two words: abolish. ICE. I think it's reasonable to assume that he means to literally abolish Immigration and Customs Enforcement, leaving the US without Immigration and Customs Enforcement.
I just want to say that I agree completely with you here. I had a suspicion of what kind of person Andrew was when I saw him with colored hair (so called 'danger hair') and basically knew it was over.
“Pushing politics is explicitly against the Hacker News guidelines though.”
Cool tirade.
Gaslighting?
You were ranting about how Alex Pretti's murder was justified just a few comments up.
STFU.
[flagged]
As someone who has been primarily writing Rust for the past 8+ years, I am actually unaware of any political drama surrounding Rust. It's just a programming language.
[flagged]
One can say words against one injustice without being required to mention every injustice.
This strikes me as a very agent-friendly problem. Given a harness that enforces sufficiently-rigorous tests, I'm sure you could spin up an agent loop that methodically churns through these functions one by one, finishing in a few days.
Have you ever used an LLM with Zig? It will generate syntactically invalid code. Zig breaks so often and LLMs have such an eternally old knowledge cutoff that they only know old ass broken versions.
The same goes for TLA+ and all the other obscure things people think would be great to use with LLMs, and they would, if there was as much training data as there was for JavaScript and Python.
i find claude does quite well with zig. this project is like > 95% claude, and it's an incredibly complicated codebase [0] (which is why i am not doing it by hand):
https://github.com/ityonemo/clr
[0] generates a dynamically loaded library which does sketchy shit to access the binary representation of datastructures in the zig compiler, and then transpiles the IR to zig code which has to be rerun to do the analysis.
To be fair, this was true of early public LLMs with rust code too. As more public zig repositories (and blogs / docs / videos) come online, they will improve. I agree it's a mess currently.
You must have not tried this with an LLM agent in the past few months.
i tested sonnet 4.5 just last week on a zig codebase and it has to be instructed the std.ArrayList syntax every time.
I made a Zig agent skill yesterday if interested: https://github.com/rudedogg/zig-skills/
Claude getting the ArrayList API wrong every time was a major reason why
It’s AI generated but should help. I need to test and review it more (noticed it mentions async which isn’t in 0.15.x :| )
Try it again. This time do something different with CLAUDE.md. By the way it's happy to edit its own CLAUDE.md files (don't have an agent edit another agent's CLAUDE.md files though [0])