Live data from Hacker News

How is the Bun rewrite in Rust going?

lockwood.dev

71–80 of 412 posts

Re: How is the Bun rewrite in Rust going?

#71

Earlier quoted context omitted.

The rust version is being used by Claude Code though - which is a fairly large product! I was hoping for more push back against https://bun.com/blog/bun-in-rust - which is pretty thorough and has some decent arguments and reasoning for why they did the rewrite.

I think they meant “released and available for use” rather than just out in the wild.

It is available for use: `bun upgrade --canary`

Re: How is the Bun rewrite in Rust going?

#72

Many repeat the point of “$165k is cheaper than team of multiple engineers working on the rewrite for a year”, which I think is flawed — the team of engineers would have produced idiomatic rust, and it would take probably 100k+ of tokens more to make the bun in rust idiomatic rust.

I doubt file by file rewriting takes as much work as rewriting and refactoring the code - especially at this scale.

Re: How is the Bun rewrite in Rust going?

#73

Earlier quoted context omitted.

Presumably lots of stuff wrapped in 'unsafe'. I'm not a rust guy or a rust fan, and the last time I wrote something with Rust was like 7 years ago, but to my memory, because of how Rust manages mutability there are many access patterns that are Rust-specific; idiomatic Rust is going to use this patterns but they would be unlikely to show up in a language with a different type system / borrow checker / etc. etc.

So "unidiomatic" rust means, 'don't use these parts of the language even though they're first-class citizens?' How odd. Lot of mental gymnastics going on there.

The Bun author himself writes that the port is not idiomatic Rust:

    Do the rewrite that looks like we transpiled our Zig code to Rust. We can gradually refactor it to reduce unsafe usage and look more like idiomatic Rust after Bun v1.4 ships.
(from: https://bun.com/blog/bun-in-rust)

The original version of Bun was already a line-by-line (manual) port of esbuild from Go to Zig (also mentioned in this post), so the Zig code already wasn't "Zig-idiomatic" and apparently riddled with problems. That doesn't inspire much confidence in the LLM-translated Rust version tbh.

Re: How is the Bun rewrite in Rust going?

#75
post #47

Earlier quoted context omitted.

A major rewrite in another language is also unusual for this project. It took TypeScript a year to go from announcing tsgo to releasing TypeScript 7.0. That work was done in parallel; here the work is being done serially — and it’s likely to take much less than a year for a new release.

Yes, its because Anthropic took over and wanted to showcase their LLM capabilities by porting such a complex codebas.

Everyone’s point is “they have everything to gain by lying about being more done then they are” and “the claims seem at least a bit full of shit”.

Re: How is the Bun rewrite in Rust going?

#77
post #7

This post doesn’t make sense. It was rewritten in Rust. The rewrite itself is complete (no more Zig). Various people have claimed that Bun in Zig had a lot of tech debt. If they’re to be believed, it seems natural to assume the rewrite does, too. Perhaps all this activity is paying down some of that debt.

> This post doesn’t make sense

The author's assumption is that a rewrite is not just a mechanical translation of code - it's also a state of stability. And no release, for the author (I agree) means no stability.

It's like a developer who says that after a week of work, a feature is 90% ready, but the other 10% is still not ready (for release) after months.

Re: How is the Bun rewrite in Rust going?

#78

Earlier quoted context omitted.

Presumably lots of stuff wrapped in 'unsafe'. I'm not a rust guy or a rust fan, and the last time I wrote something with Rust was like 7 years ago, but to my memory, because of how Rust manages mutability there are many access patterns that are Rust-specific; idiomatic Rust is going to use this patterns but they would be unlikely to show up in a language with a different type system / borrow checker / etc. etc.

So "unidiomatic" rust means, 'don't use these parts of the language even though they're first-class citizens?' How odd. Lot of mental gymnastics going on there.

It means "don't misuse parts of the language in ways that circumvent best practices" one of which is "keep unsafe regions as small and few as possible" not "never use unsafe"

Re: How is the Bun rewrite in Rust going?

#79
post #61

Earlier quoted context omitted.

> I have used LLMs to create stuff like word clones just for fun. It was a disaster. Sure, it had the basic functionality. But the moment you started with page structure (harder then one non-stop scrolling page), tables, images, rotating, and so many details that make up just the basics of word. Not even the extended functionality. You see every LLM just fall on its face. What do you think of https://scramblequest.ap…

Are you comparing 2 relatively simple games with... Word? Word is basically an operating system. Unix people like to make fun of Emacs for being one, but Word is basically one, too. And all the features in there are used, otherwise Microsoft wouldn't keep them around.

>Word is basically an operating system.

And .doc files are basically a memory dump.

Re: How is the Bun rewrite in Rust going?

#80
I'm gonna say it bluntly: I don't care about bun, never cared about bun and think nodejs is sufficient. The drama surrounding zig and rust still leaves me with a bad taste because I also don't like how nonsensical topics like that influence what we do and what we (have to) care about on a day to day basis. That is just my opinion!
Post reply on HN