Live data from Hacker News

My thoughts on the Bun Rust rewrite

andrewkelley.me

151–160 of 757 posts

Re: My thoughts on the Bun Rust rewrite

#151

Is the bun rewrite actually done? There's no tag for the release, and as it stands robobun has almost 1.3k open PRs on the repo: https://github.com/oven-sh/bun/pulls/robobun It doesn't look done. And it looks like work on the rewrite began in early may: https://github.com/oven-sh/bun/commit/46d3bc29f270fa881dd573... So... its more like a 2 month rewrite that is definitely not done yet????

From the rewrite to Rust article:

> Bun v1.3.14 was the last version of Bun written in Zig. Bun v1.4.0 will be the first version of Bun written in Rust. It's available in canary now.

It's also been shipping with Claude Code since June 17th.

Re: My thoughts on the Bun Rust rewrite

#152

> The main problem, however, was code quality. > The sleight of hand misdirects the reader away from the main way bugs are eliminated: by dedicating engineering resources to it. Perhaps the amount of bugs comes from using a C-like language that requires meticulous manual care to avoid writing runtime bugs. Even C++ would be a safer choice because of RAII. When you have to dedicate significant resources to avoid/fix r…

Memory safety problems are still possible in the new Rust Bun: At the time of writing, about 4% of Bun's Rust code sits inside an unsafe block (~13,000 unsafe keywords across ~27,000 lines / ~780,000 lines), and 78% of those blocks are a single line — a pointer that came from C++, or one call into a C library.

People bring this up a lot. What I see here is that thousands of potentially (not actually, just potentially) safety risks have been neatly tagged in the code.

If you took a program written in Zig, Go, C++, or C, you would have no idea which parts of the code were potentially unsafe. In those languages, the entire program is one big unsafe{} block.

Rust isolates unsafe code. Having them explicitly tagged means they're isolated and can be eradicated over time, if need be. Though in many cases, unsafe blocks are quite safe.

Re: My thoughts on the Bun Rust rewrite

#154

> We became increasingly horrified at the programming practices we saw in Bun's codebase. Hacks on top of hacks. > Jarred was already writing slop well before he had access to LLMs Ufff, the creator of zig saying that the biggest zig project is slop was definitly not on my bingo card. Its sad to see that on of the biggest projects was more or less badly written zig code. On that note, I wonder which big project have…

Ghostty, TigerBeatle. The other two poster children.

Re: My thoughts on the Bun Rust rewrite

#155

This is unprofessional and embarrassing for Zig. I know very little about Jared but his article yesterday, which I read, seemed appreciative of Zig. I now learn he's donated significant chunks of money to them. This entire article is publicly and personally attacking him for choosing a different product. It's insane to me that Andrew thinks this post will somehow exonerate Zig when it really just makes them look chil…

> This entire article is publicly and personally attacking him for choosing a different product

The article seems to be happy about the switch to Rust, that point is re-iterated multiple times in the article, and seemingly they were both awaiting Bun moving away from Zig and wishing for it.

Re: My thoughts on the Bun Rust rewrite

#156

Not sure a personal attack against Jarred really helps the case for using Zig. He could have and should have focused on the language and not “a stinky manager”. Honestly, this makes me want to steer clear of Andrew as much as Jarred.

Its an attack an Jarred's public, (un)professional behaviour. One most of us in the community have born witness too in recent months.

"Jarred, in his professional capacity, drove away many from our community, and we'd prefer to disassociate." is not 'Jarred is a bad person, privately'.

Now, in these circles, that might as well be the same thing, given how little personal life I imagine most VCs have left outside of work. But that's not really Andrew's problem.

I won't defend Andrew's style; I think he could mask some his neurodivergence more when communicating to a wider neurotypical audience. But it's his project, his community is certainly aware, and this too, is a known quantity.

It might help you though, to reread the piece with the assumption that Andrew is being completely sincere, without adding in a secondary subtext like, "Andrew is trying to assassinate Jarred's character".

Re: My thoughts on the Bun Rust rewrite

#157

This is unprofessional and embarrassing for Zig. I know very little about Jared but his article yesterday, which I read, seemed appreciative of Zig. I now learn he's donated significant chunks of money to them. This entire article is publicly and personally attacking him for choosing a different product. It's insane to me that Andrew thinks this post will somehow exonerate Zig when it really just makes them look chil…

> It's insane to me that Andrew thinks this post will somehow exonerate Zig when it really just makes them look childish.

Antirez made a post equivalent to: you'd be a fool not to use AI to increase test coverage.

Zig on the other hand has embarrassingly low test coverage given its adoption and time in development.

Their stance on AI is completely childish. They could benefit massively from it, yet refuse to even consider any potential usage.

It's one thing to try to stop PR spam. It's another thing to tie your hands behind your back and not even use it internally for the lowest hanging fruit where it could have major benefits.

They could use AI to triage potential real bugs from PR spam... but instead they just let real bugs go unnoticed for longer than need be because they won't even use AI to help triage...

Re: My thoughts on the Bun Rust rewrite

#159
post #49
post #30

Earlier quoted context omitted.

Same. After following the drama on HN and Twitter it's pretty clear Jarred has been intentionally doing something that's hurting Zig/Bun community. What I've seen check out with those statements in the post

To me, most on HN have drank the AI koolaid (and/or are financially invested in it), and God forbid a direct and personal critique on a project owned by Anthropic! We must not let the shareholder value fall /s

I find the pro-AI and anti-AI somewhat inconsistent, where I had either side strongly reacting to my comments. I personally didn't expect so much support for Bun in this thread.
Post reply on HN