Live data from Hacker News

How is the Bun rewrite in Rust going?

lockwood.dev

251–260 of 412 posts

Re: How is the Bun rewrite in Rust going?

#251

As a comparison point, someone decided to try to fix the issues in the Zig original and is now claiming sub-second build times, plus fixed bugs, by modernizing the codebase and sticking with best practices - indicating that all of the issues that justified the rewrite were self-inflicted and addressable. https://ziggit.dev/t/buz-a-drop-in-replacement-for-bun-using... I have no skin in this game, and the Zig version i…

> indicating that all of the issues that justified the rewrite were self-inflicted and addressable The main issue that justified the rewrite were memory bugs, especially related to interaction with GC managed Javascript objects. There is no fully general way to prevent those bugs in Zig, and I don't see any claims that they did so in Buz.

They also complained about build times, and in fact the Rust rewrite started immediately after some other drama about Bun being unable to contribute back LLM-written changes to the Zig compiler to improve build times, and the Zig team rejecting them in principle. So while memory issues did become the focus later, I don't think it was the entire story.

Migrating to Rust in a one-to-one translation with unsafe blocks does not make the code any more safe initially. It might provide tools to do a significant refactor that solves lifetime issues with Rust's help, but I haven't seen evidence that they've done that either. They're also embedding a large C++ codebase, JavaScriptCore, so there are always going to be unsafe areas and touchpoints where memory issues could live, and Rust won't magically solve them.

Re: How is the Bun rewrite in Rust going?

#252
post #84

Earlier quoted context omitted.

Claude Code most likely only uses a tiny fraction of Bun/Node features, so Claude Code switching to the Rust rewrite doesn't mean all that much.

Look, I understand being skeptical of the whole process; the discourse about this has been extremely tiring. But at some point if “moving one of the biggest actively maintained and used codebases to it without anyone noticing” is dismissed as “it doesn’t mean all that much”, then we’ve lost the plot a little bit somewhere.

Claude Code client isn't one of the biggest actively maintained and used codebases. If it is one of the biggest, that's showing AI's tendency to waste its own tokens and your money.

Re: How is the Bun rewrite in Rust going?

#253
post #107

Earlier quoted context omitted.

It's the equivalent of porting Unreal Engine 5 to another language and then using it exclusively to run a 2D Tetris clone. Let's wait for the next Bun release when more real-world code is hammering it before declaring victory. (also, fwiw, a manual rewrite would be under the same scrunity and suffer from the same skepticism, at least when obviously rushed).

If you ported UE5 to, idfk, Malbolge and ran Tetris on it and someone would dismiss it as “not impressive”, I would think they lost the plot too!

"I ported .NET framework to x86 bare metal. Here's hello world as proof."

Re: How is the Bun rewrite in Rust going?

#254
post #148

Bun’s Rust rewrite shipped in Claude Code over a month ago and barely anyone noticed. Claude Code is widely used. The Rust rewrite is going well overall. In the Bun v1.4 video, I promised a certain number of newly passing Node.js tests were added to force us to improve compatibility, and that number is not true yet. The release is delayed until it is true. The PRs to make it true are up but not merged yet. Most likel…

We would need to know at least:

- How many people have updated Claude/Bun to the latest version.

- How many subscribers care about reporting issues. Most of them are forced to use the tool against their will and have mentally checked out already. Why report issues if your employer values slop code anyway. Just log the hours and keep your head down. Maybe it is not expedient for the AI narrative to report issues!

- How many subscriptions are real vs. bulk distiller accounts.

- If subscriber numbers are inflated.

Judging by the weird Claude Code Github issues page, there are suspiciously few new issues: about 2 to 3 a day only vs. alleged subscriber numbers of 4 million.

Re: How is the Bun rewrite in Rust going?

#255
post #107

Earlier quoted context omitted.

It's the equivalent of porting Unreal Engine 5 to another language and then using it exclusively to run a 2D Tetris clone. Let's wait for the next Bun release when more real-world code is hammering it before declaring victory. (also, fwiw, a manual rewrite would be under the same scrunity and suffer from the same skepticism, at least when obviously rushed).

If you ported UE5 to, idfk, Malbolge and ran Tetris on it and someone would dismiss it as “not impressive”, I would think they lost the plot too!

"I ported .NET Framework to x86 bare metal. Here's proof using Hello World."

Re: How is the Bun rewrite in Rust going?

#256
post #124
post #90

Earlier quoted context omitted.

I think this is perfectly fine. If you explore Github, you're gonna see thousands of abandoned game engines, compilers for made-up languages. And that has been happening since before the LLM era. I used to be part of an OS messaging board in the early 2000s and almost everyone had their own OS. A dozen people or so could even run Firefox! I remember (now legend) Terry bothering us to check out LoseThos or GodOS or wh…

> Not all software needs to be commercial to be useful, even if it's just for a learning experience. I have learned a lot from those experiments, even if they're not polished. This is fine so long as the author is learning something (questionable) and not polluting the commons with "I made this in a weekend" vibe slop.

> This is fine so long as the author is learning something (questionable) and not polluting the commons with "I made this in a weekend" vibe slop

This is exactly the same as demanding, that people who post their thoughts always post original, useful thoughts. It's just not going to happen. Making something easy will increase the total volume and the majority of that volume will be junk. It's inevitable. What is needed is a search engine for quality software. Perhaps LLMs can do that, since they are better at understanding concepts than generating them.

Re: How is the Bun rewrite in Rust going?

#257

Earlier quoted context omitted.

A postmortem is for reflecting on something that went so wrong you had to kill it, and you want to objectively describe what led to that, and what lessons can be learnt from the failure. A retrospective is just the reflecting part, without implying you believe it is going to fail and you're looking for some schadenfreude ;)

This might be terminology that's used differently in different places. For instance, in video games it is extremely common to use "postmortem" to mean "post-shipping." Example: https://blog.codinghorror.com/game-development-postmortems/ Note the dual emphasis on both "what went right" and "what went wrong," not just one or the other.

But postmortem is literally “post death” in Latin. It’s synonymous with autopsy! I know people misuse borrowed words all the time, but come on?!

Re: How is the Bun rewrite in Rust going?

#258
post #218

Earlier quoted context omitted.

I've been reading people use "postmortem" to describe software retrospectives for like... 15+ years. Mostly in the opensource, or marketing-blog spaces. The detailed investigation and fix report was a favorite genre of blogpost. And if someone's bragging about the design of an enhancement, or investigating a bug, then the overall product isn't dead. They're (usually) not talking shit to anyone. It's the bug that's de…

In the specific case of ship retrospectives, I prefer to call them “postpartums”.

I guess they’re saying their shipped code is DOA?

Re: How is the Bun rewrite in Rust going?

#259
post #65

I am fascinated by the discourse around this Bun rewrite. I read a lot of drama and personal accusations, there are pieces like this one trying to extract clues, and it seems everyone has a deeper ideological concern behind whatever they are trying to say. For this article, it seems to be skepticism towards AI and how successful it can be at replacing programmers. Other takes, like the one from the Zig maintainer, we…

You see this response because the port of Bun from Zig to Rust does not have anything to teach us about Zig, Rust or porting between languages with LLMs.

There are so many non-quantifiable properties to evaluate of the 'before' and 'after' codebases. Choices and preferences to be had about languages, language porting in general, and LLM coding.

After all that, pretend we could have a clear convincing distillation of the port and want to go apply the lessons learned. If someone doesn't get LLM porting results as good as Bun did, or it cost them substantially more in tokens, then they're "holding it wrong." If someone is underwhelmed by Bun's results, then it was just a proof of concept and the models have gotten so much better in the last 6 months anyway you can't compare.

Re: How is the Bun rewrite in Rust going?

#260
post #257

Earlier quoted context omitted.

This might be terminology that's used differently in different places. For instance, in video games it is extremely common to use "postmortem" to mean "post-shipping." Example: https://blog.codinghorror.com/game-development-postmortems/ Note the dual emphasis on both "what went right" and "what went wrong," not just one or the other.

But postmortem is literally “post death” in Latin. It’s synonymous with autopsy! I know people misuse borrowed words all the time, but come on?!

> is literally “post death” in Latin

Yes; I think what I described matches that meaning?

Post-death, as in: "it's over," "activity has halted," "no more work being done."

Death does not necessarily have a bad/negative connotation. It's just the end of something.

This is in contrast to the original comment: "something that went so wrong you had to kill it." Death does not imply something went wrong or that it happened forcefully.

I guess "autopsy" generally is talking about "finding the cause of death" so maybe that has a more negative connotation ("something (bad) happened, causing death, let's find it").

Ah, words with their fuzzy meanings (:

Post reply on HN