Drilling into the original article where Jarred explained the reasoning behind the change, It's pretty clear that under zig the team was doing things by hand that are automatic in rust. Humans and agents share one thing: they are both non-deterministic. He talks about the issue of tracking memory lifecycles manually in zig so it can be explicitly freed. As expected, this leads to a long list of bugs where people miss…
> He talks about the issue of tracking memory lifecycles manually in zig so it can be explicitly freed. As expected, this leads to a long list of bugs where people missed things. Yes, and again the "you're holding it wrong" people or "you are not a good enough developer" people will try to do juggling with a chainsaw and lose a couple of fingers in the process Claude Code's endorsement (and real-world testing) speaks…
Claude Code uses Bun written in Rust now
781–790 of 920 posts
Re: Claude Code uses Bun written in Rust now
#782Earlier quoted context omitted.
"Fun fact", it lets you largely circumvent the borrow checker by creating arbitrary lifetimes: https://news.ycombinator.com/item?id=48974824
People are so funny about rust. “Safe rust isn’t expressive enough!” -> then use unsafe rust. “Unsafe rust lets you do anything! Even crazy things!” -> then use safe rust. Or just don’t write crazy code? Does bun actually do anything insane like that in its unsafe blocks? Or are you just fear mongering?
> Does bun actually do anything insane like that in its unsafe blocks?
Who knows? At 10k unreviewed uses of unsafe, I'd guess there are quite a few incorrect ones. LLMs don't produce perfect code (neither do humans), so there's a high probability that at least some of those create UB.
Re: Claude Code uses Bun written in Rust now
#783Earlier quoted context omitted.
Is that before or after the earths atmosphere acidifies for humans and our bodies can’t hold enough phosphorus or calcium for basic metabolic tasks? You have until 2050: https://doi.org/10.1007/s11869-026-01918-5
these doom and gloom reports also said half the land will be under water by now and average temperature will be 40c. Didn't happen. Earth is in a cooler period and it will get very warm. These crappy climate change activists will not get anything done but to hold us back. We need more power, more tech, and more abundance of things. We will need to engineer our way out of real climate change.
Re: Claude Code uses Bun written in Rust now
#784Earlier quoted context omitted.
What's the point of using Rust in the first place when you disable the compiler feature that protects you the most?
Mu. Invalid question. Rust doesn't disable compiler features. It gives you extra set of footguns when you ask for it. As for the actual unloaded question, "What's the point of unsafe in Rust?" it is to contain and make it easier to identify sources of UB.
Re: Claude Code uses Bun written in Rust now
#785Earlier quoted context omitted.
Zig (like C) is simply not a good language to use if you're going to do many small allocations with uncorrelated lifetimes. To write robust Zig (or C) code, you must manage lifetimes yourself, for example by grouping allocations on an arena or by having fixed buffers of "things". You can just do that, and then Zig is really no less robust than Rust. But if you want to do "managed language" style allocation patterns (…
> You can just do that, and then Zig is really no less robust than Rust. If you just don't write bugs, then yes all languages are equally robust, including assembly. Zig, like C, is simply not a robust language. I don't know why this feels like something contentious? It's clearly not intended to be robust?
Of course you could argue that on average, most programmers are not going to have the right practices and skill, so on average you should prefer Rust. But that's unrelated to the argument I was making, and in any case not a very interesting point in my opinion.
Re: Claude Code uses Bun written in Rust now
#786Earlier quoted context omitted.
Borrow-checking the dereference of a stale pointer won't be worth much, though.
Sure; but I bet raw pointers are used very infrequently in the new codebase. The code was ported from zig to rust. I bet a lot of pointers became rust references in the process.
Re: Claude Code uses Bun written in Rust now
#787Earlier quoted context omitted.
People tried to "just do that" (write their programs in a memory safe way) in C and other languages with manual memory management for decades, and we have countless vulnerabilities that prove this simply doesn't work. That's why newer languages, with the notable exception of Zig, prefer more advanced memory management methods.
> People tried to "just do that" (write their programs in a memory safe way) in C and other languages with manual memory management for decades, and we have countless vulnerabilities that prove this simply doesn't work. Who are these "people" you speak of? It's possible to write software in low level languages that don't have these problems. Not a "non-zero" it might be possible, it can be done thoughtfully, and the…
Re: Claude Code uses Bun written in Rust now
#788Earlier quoted context omitted.
> You can just do that, and then Zig is really no less robust than Rust. If you just don't write bugs, then yes all languages are equally robust, including assembly. Zig, like C, is simply not a robust language. I don't know why this feels like something contentious? It's clearly not intended to be robust?
Realistically much of the most reliable software in the world was written in C. Robustness is more so a function of coding style and engineering practice than it is of the programming language chosen. Of course you could argue that on average, most programmers are not going to have the right practices and skill, so on average you should prefer Rust. But that's unrelated to the argument I was making, and in any case n…
The problem is mostly people graduating from school thinking that somehow there is only stack and heap, and malloc/free is how you do heap. That view completely ignores that the essence of programming systems is mostly to understand the machine, and then doing conceptual and architectural work on a solution (and also on a problem). The act of writing actual code is then mostly just translating those concepts into the digital world verbatim.
Re: Claude Code uses Bun written in Rust now
#789Earlier quoted context omitted.
> If you are depending on some behavior not covered in the regression tests, how do you know the next minor release won't break you? Decades of intrinsic knowledge. Which a rewrite lacks. imho the issue is the language used. AI rewrites are cheap and cheap exercises require a great deal of scrutiny and proof of correctness. Simply using regressions test lacks the intrinsic knowledge of a decades old codebase stuck in…
>> Decades of intrinsic knowledge. Which a rewrite lacks. You mean the ones encoded in the regression suite? I think your argument is valid in many medium-to-faang firms where the application is going to have encoded business logic that isn't explicitly tested for. If anything, projects like PG are the exact opposite: no business context and regression suites that test every possible scenario due to the accumulation…
Spend time enough with a codebase and you’ll know stuff about its behavior that is not encoded in a test suite. Especially when you need to adjust an integration tests due to the modification of an invariant in a dependency.
> How do you know every release of PG doesn't break in the setting of "a year in a sufficiently large system"?
Because the postgres team is professional and will take care of publishing a changelog for what has been modified since the last version.
Re: Claude Code uses Bun written in Rust now
#790Earlier quoted context omitted.
People tried to "just do that" (write their programs in a memory safe way) in C and other languages with manual memory management for decades, and we have countless vulnerabilities that prove this simply doesn't work. That's why newer languages, with the notable exception of Zig, prefer more advanced memory management methods.
> People tried to "just do that" (write their programs in a memory safe way) in C and other languages with manual memory management for decades, and we have countless vulnerabilities that prove this simply doesn't work. Who are these "people" you speak of? It's possible to write software in low level languages that don't have these problems. Not a "non-zero" it might be possible, it can be done thoughtfully, and the…
The good news here is that we have more than just anecdotes to support this, we have empirical evidence.