Live data from Hacker News

How is the Bun rewrite in Rust going?

lockwood.dev

261–270 of 412 posts

Re: How is the Bun rewrite in Rust going?

#261

Earlier quoted context omitted.

I thought it was a fairly common turn of phrase! https://blog.codinghorror.com/the-project-postmortem/

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 ;)

A post mortem is a very common term in many industries on how something went after you shipped it.

You’re taking it very literally here, it does not involve anything being dead or killed.

We’ve used this in the software, games, film and construction industries for decades at this point.

Substitute Mortem for Ship and that’s how people use it.

Re: How is the Bun rewrite in Rust going?

#262

Earlier quoted context omitted.

> 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 d…

It wasn’t just on principle that those changes were rejected, they also stated the bun changes were not actually that great or general enough to upstream.

Re: How is the Bun rewrite in Rust going?

#263
post #26

I'm not sure how much insight we can glean from looking at the number of commits and release cadence here. In the aftermath of such a major refactor/rewrite, I would expect it to take some time to get back up to their usual development speed. Jared and the other developers are new to the Rust codebase, even if the structure is largely familiar. They're also likely focusing on other priorities right now such as tracki…

They also have made a release, in a sense, since they moved all Claude code users to it a month ago. (And apparently no one noticed). I think they're taking things "gradually" as they are under a lot of scrutiny and no rush for full release.

If that is true, isn't it a bit unconventional? What version are they using, some random Git SHA? Why couldn't that have been made to a release or a release candidate at least?

Re: How is the Bun rewrite in Rust going?

#264
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…

Jarred, thank you for working on Bun. Many "vibe coded" :D projects start strong and are later abandoned (like potentially Anthropic C), so I understand why people worry about Bun's future. I hope Bun lasts for many years, like GCC. Bun is fast and great to use.

Anthropic's C compiler was a proof of concept[1], so it makes sense that it was abandoned.

[1] What it actually proved is up for debate.

Re: How is the Bun rewrite in Rust going?

#265
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!

A human doing it is impressive. A human performing many computations a computer could do would be impressive. I don't get impressed when a computer computes a number. A language machine translating is just... doing what a language machine does? When a language machine starts doing something other than translation, I will be impressed. If computers starting singing without any human intervention, for example, would be incredible! C3PO knows many languages—he may know Rust and Zig. C3PO translating from Zig to Rust isn't surprising to me. Sounds par the course for a robot who knows languages.

Re: How is the Bun rewrite in Rust going?

#266
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! - Ho…

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

By default, Claude Code updates itself all the time without asking for permission, so I'd say most users are on the latest versions.

Re: How is the Bun rewrite in Rust going?

#267
post #84

Earlier quoted context omitted.

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.

Why is porting a program from one language to another seen as some great achievement? We had f2c in the 1990s. https://en.wikipedia.org/wiki/F2c

This isn't a valid comparison. f2c is a compiler and the output isn't intended to be human readable.

Re: How is the Bun rewrite in Rust going?

#268
post #132

Earlier quoted context omitted.

This is where we've come to where people proudly proclaim using an AI to do what is a single line of CSS.

"centering div" is a classic problem (/trauma/meme) that sounds trivial but had no universal solution (until 2017?).

And has a dead simple one today.

Also worth noting simple horizontal centering of divs was never a problem, margin: auto was defined in CSS Level 1 in 1996 [1].

It was vertical centering that took a very long time to crack, which really became trivial with Flexbox which was first drafted in 2009[2] but became available unprefixed in browsers between 2012 and 2014 [3] about 13 years ago.

[1] https://www.w3.org/TR/REC-CSS1-961217

[2] https://www.w3.org/TR/2009/WD-css3-flexbox-20090723/

[3] https://caniuse.com/flexbox

Subnote: I'm not counting the display: table hacks.

Re: How is the Bun rewrite in Rust going?

#269
post #182

Earlier quoted context omitted.

CI has always been expensive for Bun including before the acquisition. We build for [macOS, Linux, FreeBSD, Android, Windows] x [ARM64, x64] and then run tests on multiple Linux distros with multiple shards, multiple macOS versions and Windows for each architecture. We recently started cross-compiling all the builds on Linux arm64 and that made it a little faster (I wrote a CLI tool to download the correct macOS head…

How come Bun uses Buildkite instead of self-hosting the CI infra?

Presumably because they "build for [macOS, Linux, FreeBSD, Android, Windows] x [ARM64, x64]" and self hosting all of that would be time-consuming and expensive.

Re: How is the Bun rewrite in Rust going?

#270
post #236

Earlier quoted context omitted.

It's pretty off topic/ irrelevant and it's self promotion.

An example of an LLM porting code is off topic to a project where the issue is entirely about an LLM porting code? Can you explain that more?

No, I don't think it warrants explanation. If you think it's on topic, I'd suggest adding more context and relating it to the parent post rather than just linking to your own project.
Post reply on HN