Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

heldrida 490 points 463 comments May 09, 2026
twitter.com · View on Hacker News

https://xunroll.com/thread/2053047748191232310 Recent and related: Zig → Rust porting guide - https://news.ycombinator.com/item?id=48016880 - May 2026 (540 comments)

Discussion Highlights (20 comments)

heldrida

An update on Bun’s experimental migration from Zig to Rust: The Rust rewrite now passes 99.8% of Bun’s pre-existing Linux x64 glibc test suite.

aurareturn

6 days of work to do this. Even if it doesn't end up becoming meaningful, it shows just how tokens and work done will be linked now and in the future. It's going to be hard to compete with someone or a company that has more compute. They will just be able to do things you can't.

anilgulecha

I think the industry is moving to English as the programming language, and specifications-context-tdd as the framework for building software. Many find it distasteful, and many finding liberating. I think it's broadly correlates with how they feel about expressing themselves in english vs say C++. As a side question, is there anyone who's using LLMs primarily in non-english mode to program? I suspect there's quite a few people using mandarin, but can someone share first-hand account.

lousken

Good enough for a side project, not good enough for transferring banking system from cobol

spicyusername

What a time to be alive. So much of the fundamental dynamics of the industry and the job have changed in so little time. Basically over night. Some days I am so excited at how much I can do now. You can build anything you want, in basically no time! 100% of my software dreams can be a reality. Some days I am terrified at what's going to happen to the job market. Suddenly you can get so much with so little. The world only needs so much software. Is every company that sells software as their core business model going to go out of business? What will happen if only certain companies or governments get access to the best models?

pulsartwin

At the very least, it's interesting to be a bystander observering as efforts like this progress. The first thing it makes me wonder is how comprehensive/high quality the test suite is to begin with. Not to cast aspersions, but even at 100% on all platforms I wonder how confident the Bun team would be in migrating.

m4rtink

What license is this ? Let me guess, its is no GPL...

0-bad-sectors

Interesting! I wonder how the performance is compared to the Zig version

ksec

I think a lot of people taking this at face value , a lot of this was possible because of the beyond standard extensive and comprehensive test suit previously built.

akagusu

What does this mean for Zig? Few big popular projects use Zig, if they start to move away from it, what Zig's future will look like?

rererereferred

The branch in question: https://github.com/oven-sh/bun/compare/main...claude/phase-a...

Tiberium

I just want to comment that I think it's a good change if we look past the AI involvement. Bun has had an extremely high amount of crashes/memory bugs due to them using Zig, unlike Deno which is Rust. Of course, if Bun's Rust port has tons of `unsafe`, it won't magically solve them all, but it'll still get better

tmaly

Just a cautionary case of porting to Rust using AI https://blog.katanaquant.com/p/your-llm-doesnt-write-correct...

legerdemain

From 4 days ago: https://news.ycombinator.com/item?id=48019226 > I work on Bun and this is my branch > > This whole thread is an overreaction. 302 comments about code that does not work. We haven’t committed to rewriting. There’s a very high chance all this code gets thrown out completely. > > I’m curious to see what a working version of this looks, what it feels like, how it performs and if/how hard it’d be to get it to pass Bun’s test suite and be maintainable. I’d like to be able to compare a viable Rust version and a Zig version side by side.

timetraveller26

3 years from now: Linux ported to Rust in 6 days. And on the seventh day Claude ended His work which He had done, and He rested on the seventh day from all His work which He had done

nine_k

> 99.8% of bun’s pre-existing test suite passes on Linux x64 glibc in the rust rewrite OK, they've got a working prototype, congrats! Now it needs to be put into shape so that all the unsafe blocks are eliminated (maybe with a few tiny exceptions), and the code is turned into maintainable, readable, reasonably idiomatic Rust. I wonder how long is it going to take.

born-jre

Being anthropic accuired project does he have access to mythos or it’s normal Claude we plebs have access to

pdhborges

Curious how the test suite was applied. Was it ported from Zig to Rust beforehand?

afavour

Presumably the biggest loser in all this is Zig, I only know of the language because of Bun. But the timescale still gives me pause… just because AI lets us convert a codebase in 6 days doesn’t mean it’s wise. There are surely a lot of downstream implications! It’s always felt a little like Bun is making up a plan as it goes along (and maybe that’s unfair), this seems to underline the point.

pjmlp

> why: I am so tired of worrying about & spending lots of time fixing memory leaks and crashes and stability issues. it would be so nice if the language provided more powerful tools for preventing these things. As expected, Modula-2 / Objective Pascal like safety was great during the last century, before automatic resource management, and improved type system became common in this century. Naturally also have to note, wasn't this supposed to be only an experiment, nothing serious?

Semantic search powered by Rivestack pgvector
8,303 stories · 78,303 chunks indexed