frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Bun's Rust rewrite has been merged

https://old.reddit.com/r/rust/comments/1tcrmjs/rewrite_bun_in_rust_has_been_merged/
75•ale•1h ago

Comments

christophilus•1h ago
Well, that escalated quickly. I think I first heard rumors of this a week or two ago. That's a very vast turnaround for such massive code-churn. I don't know how to feel about this.
linkregister•1h ago
Source: https://github.com/oven-sh/bun/pull/30412
therepanic•1h ago
About 9 days ago, Jarred wrote that it was far from certain that this would merge and that it was an overreaction. Ironic.
noosphr•57m ago
When you don't own your company any more anything you say can be safely ignored. It was obvious that the token spend will need to be justified.
simlevesque•55m ago
They've been shady since day one, claiming wild performance improvement compared to their competitors and never proving any of them.
simlevesque•57m ago
[flagged]
Yeroc•54m ago
I think Jarred's response at the time was intended to cool the ridiculous hype when the branch first appeared!
dang•23m ago
You've crossed into personal attack with this, and that's not allowed here. Please don't.

https://news.ycombinator.com/newsguidelines.html

gib444•6m ago
[delayed]
rcxdude•6m ago
I mean, that doesn't exclude the outcome that it gets merged.
darthShadow•1h ago
Duplicate: https://news.ycombinator.com/item?id=48132488
kracket•58m ago
It's going to be absolute mess of total AI slop and black box that nobody understands and is going to cause more issues than it fixes.
vitaminCPP•43m ago
Yep. How will we manage those 10x code projects, when LLMs cost increases by 10x?
philipbjorge•39m ago
I've done some pretty incredible things with LLMs. If this were sqlite with its exhaustive test suite... OK, I can see it.

It's hard for me to see this not becoming a pile of slop, but hey, maybe I'm wrong

gm678•57m ago

    $ rg 'unsafe [{]' src/ | wc -l
    10428
    $ rg 'unsafe [{]' src/ -l | wc -l
    736
    
    Language        Files     Lines      Code  Comments    Blanks
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    Rust             1443    929213    732281    116293     80639
    Zig              1298    711112    574563     59118     77431
    TypeScript       2604    654684    510464     82254     61966
    JavaScript       4370    364928    293211     36108     35609
    C                 111    305123    205875     79077     20171
    C++               586    262475    217111     19004     26360
    C Header          779    100979     57715     29459     13805
vitaminCPP•45m ago
We got memory safety at home !

At home:

> 10428

Robdel12•40m ago
Sure hope Mythos is as world beating as they claim, they’re gonna need it now.
ordu•34m ago
The half of the files contain 'unsafe' keyword? It doesn't seem as a good rewrite. What is the point of rewrite into Rust, if ~half of your code is still unsafe?
embedding-shape•32m ago
Some correct me if I'm wrong, but it's unlikely they wrote this first initial version of Rust and will leave it unchanged as-is. What's there now is a step in a long process, not the final destination.
tayo42•31m ago
Rust has a ton of other features besides safe. Like exhaustive checking of enum variants and the ability to avoid using null with option and result.
_aavaa_•22m ago
1. Rewrite from zig to rust in close to zig as you can.

2. Turn into idiomatic rust.

fbernier•21m ago
Bun is fundamentally a boundary-heavy system and it also rolls its own version of a lot of things that people typically use via libraries, where unsafe is hidden. (no async, memory arenas, etc). It also uses FFI heavily which requires unsafe.
petcat•15m ago
Cool you can just search specifically for potentially unsafe code in Rust. How do you search for unsafe code in Zig? Or do you just have to assume it's everywhere?
jauntywundrkind•57m ago
What does this mean for bun add-ons like opencode's opentui? Did FFI also somehow get ported or will that have to be updated? https://github.com/anomalyco/opentui
atonse•56m ago
I have full faith, it's the same really smart people that built bun (Jarred and team) that have spearheaded this and are running it. So I have no reason to believe that this was done carelessly.

That said, I'm still shocked and amazed that something this big is possible these days. But as we've seen multiple times now, one of the most important things your codebase can have is a solid test suite.

I will continue to use bun, because at the end of the day, it isn't just the technology, but the talent/people behind the technology that ensures that it will be solid.

And since that hasn't changed, I will still trust bun and its direction.

Also, bun is mostly glue code and sort of "user space" libraries (my words) as Jarred has said on X, most of the underlying runtimes like JavascriptCore, etc weren't rewritten.

So this isn't like 100% of what we think of as bun was rewritten. It's more like the scaffolding and harness.

moomoo11•39m ago
yeah but it also made some tests pass by changing the tests. i’m not super familiar so i’ll dig more on weekend but it seems sus pending more review. i’ve had ai do similar things that i caught in manual review. cheating the test is bad.
gmueckl•10m ago
It is welk known that agents can cheat or go off on tangents and not recover. Just recently deleted a bunch of code files that I didn't ask for. The code wasn't even used anywhere.
ifwinterco•34m ago
Just because it's possible, doesn't mean that it's sensible
bigstrat2003•13m ago
> So I have no reason to believe that this was done carelessly.

Writing software with an LLM is doing it carelessly.

vitaminCPP•56m ago
> +1009257 -4024

Bun is now over 1M lines of Rust code.

This is approaching the size of the Rust compiler itself; except that BunJs is mostly a JavaScript interpreter wrapper + a reimplementation of the NodeJS library (Rust STD wrapper).

I think BunJS is becoming the canary for software complexity management in the LLM era.

embedding-shape•33m ago
> I think BunJS is becoming the canary for software complexity management in the LLM era.

Yeah, Cursor did the same thing, bragging about how many lines of code they managed to produce for a semi-working browser, completely missing the idea where less code is better, not the other way around.

sunrunner•16m ago
I'm not sure if it's just the leading '+' or if there are other factors for phone number detection on iOS, but on mobile the line count changes are underlined and I can tap it to start a call, which, if it is because of the diff size, is something I find pretty amusing.
nesarkvechnep•10m ago
Maybe it's the phone number of the vibe coding police?
ibejoeb•55m ago
Github is failing to load the 800 comments, naturally. I'll bet they're fun.
Imustaskforhelp•47m ago
Github actually made my computer lag when there were no comments at all because of the 1 million lines of code added iirc. I could've responded something first but well I wanted to say something meaningful and didn't have anything so I just closed it.

I had to literally force quit my browser because of how much it lagged iirc.

pixelesque•7m ago
6,755 commits for the PR as well...
alfanick•49m ago
I'm confused. Never heard of Bun until a few days ago here on HN. It's some nodejs wrapper thingy, written in Zig, and someone decided to use LLM to rewrite it in Rust. Is this a big deal? Who is even using this software? Why is this big?
konart•45m ago
Rust vs Zig "wars" etc.

Also at some point Bun was acquired by Anthropic. And some people feared that this will greatly influence Bun's development.

binary132•42m ago
which was obviously a reasonable reaction.
applfanboysbgon•43m ago
Bun is not a node.js wrapper, it is a node.js alternative. It had non-trivial adoption, tens of thousands of stars on github for whatever that's worth (before the AI spam took over stars). It was then purchased by Anthropic and now we're witnessing open source software that people used be sacrificed to the altar of LLM marketing hype.
jesse_dot_id•42m ago
Not mature enough for everyone to be using it yet, but it may dominate the space down the line. They compete with Deno.
tshaddox•41m ago
Bun isn't a node.js wrapper. It's an alternative to node.js that sits at roughly the same spot in the stack.

Node.js is a distribution of the V8 JavaScript engine (the thing that executes JavaScript in the Chrome browser), along with a bunch of standard library code written mostly in C++.

Bun is a distribution of the JavaScriptCore engine (the thing that executes JavaScript in the Safari browser), along with a bunch of standard library code written mostly in Zig (and now Rust). Bun's standard library is in many cases compatible with or inspired by the Node.js standard library, but with some changes for convenience and performance.

yoyohello13•41m ago
Bun has a lot of buzz as 'the next big thing' in the JS ecosystem, and was recently purchased by Anthropic. So it's kind of in the zeitgeist.
hxtk•40m ago
I think relatively few people are probably running Bun in production, but as a dependency management system and bundler for the JavaScript ecosystem, it's similar to `uv` from the Python ecosystem in how much faster it is compared to the most popular alternatives so it's fairly popular in that space.
mgrandl•22m ago
PNPM is just as fast and much more reliable.
weraK10•48m ago
As an educational thread, see this one from a week ago where Jarred again deflects from a merge decision and legions of foot soldiers attack anyone who predicted the impending merge:

https://news.ycombinator.com/item?id=48073680

Didn't age well, did it?

makotech221•43m ago
first major company to really nuke their main product via AI psychosis?
ChrisArchitect•42m ago
[dupe] https://news.ycombinator.com/item?id=48132488
losvedir•41m ago
Wow. This is going to be interesting to follow. There's absolutely no way any of this code was reviewed, but maybe we're in a post-human world now where you can trust the models to write and review the code. This is like Gastown but on a higher profile project. Will be fascinating to see how this project is able to add new features going forward (or even _if_ it will be able to).

Does anyone know how exactly Bun is used by Anthropic? Is it a part of Claude Code? I'm more than slightly worried about using Bun going forward myself, but I'm not sure to what extent that applies to using Claude as well.

rafram•29m ago
> you can trust the models to write and review the code

You definitely cannot!

operatingthetan•25m ago
Reminds me of going on linkedin and seeing all these sales and product people who are talking big game about engineering now. Well yeah they are definitely producing something but not sure I'd call it "engineering."
gmueckl•17m ago
You can trust them to flag some things during review that may or may not be relevant. But just like with human review and unit testing, you cannot guarantee the absence of bugs after an LLM code review. It's just another set of (virtual) eyeballs.
torben-friis•15m ago
Does anyone know how exactly Bun is used by Anthropic? Is it a part of Claude Code?

It seems to be used by anthropic as a way to shift the discussion window into it being acceptable that you yolomerge millions of lines.

darknoon•8m ago
the `claude` binary is essentially a packed copy of bun + the js code, so this will replace the native runtime part of claude code.
sudb•41m ago
If this means that segfaults become rarer with Bun I might consider using it in production again. As it stands, Bun has been great as an all-in-one TS/JS package manager, build system and test runner but unstable enough that I still want Node running in production backends.
sisve•26m ago
Yes. That is the plan.

See jared comment [0]

If this helps bun and rust is a better lang for developing bun going forward with the help of claude. Then i think that is just find.

I thought rust was making the codebase complex so zig won on speed and dx.

But with llm and a large codebase it seems like rust gives fewer bug and you can develop it faster & safer.

https://news.ycombinator.com/reply?id=48133519&goto=threads%...

LucidLynx•40m ago
Is this really the state of "software engineering" today? :/
gmueckl•14m ago
That's what the new AI overlords want the world to believe, at least.
elwesties•21m ago
This is so awesome! What a time to be alive that something like this is possible.
nesarkvechnep•5m ago
The average quality of the Zig projects got up.
dgellow•3m ago
If the bun team is around I would be interested to get their opinion on this: in the old time migrating a 1M codebase from one language to another meant you would pretty much become an expert in the target language. The output of the work is team experience/knowledge + the actual rewrite. With that Bun rewrite do you feel that the Bun team learned something other than “Claude can rewrite a very large codebase in no time”, which is impressive in itself. Is the output only the rewrite, or did you learn something along the way? And how do you feel about your answer? Not a snark question, like a lot of others I’m myself trying to understand how I feel about how our profession is/has been changing.

City and Flock Manipulate Security Scores

https://ipvm.com/reports/flock-review-dunwoody
1•jhonovich•49s ago•0 comments

Hackers earning millions from hijacked cargo, FBI says

https://therecord.media/hackers-earning-millions-from-hijacked-cargo-fbi
2•PaulHoule•3m ago•0 comments

Classic Trollyology but you've been Ransomwared

https://actlikeabreach.online/
1•splintersio•3m ago•1 comments

2028: Two scenarios for global AI leadership

https://www.anthropic.com/research/2028-ai-leadership
2•mmq•5m ago•0 comments

Show HN: Visualizing Tiny LLMs from OpenAI's Parameter Golf

https://leebutterman.com/2026/05/01/visualizing-tiny-llms-in-parameter-golf.html
1•lsb•6m ago•0 comments

The AI Layoff Bill Is Coming Due, and CTOs Are Going to Pay It Twice

https://www.forbes.com/councils/forbestechcouncil/2026/05/14/the-ai-layoff-bill-is-coming-due-and...
5•cdrnsf•8m ago•0 comments

Video codecs are a nightmare for game developers

https://www.gamedeveloper.com/programming/video-codecs-are-a-nightmare-for-game-developers-but-th...
1•ledoge•8m ago•0 comments

German intelligence offices snub Palantir software

https://www.dw.com/en/german-intelligence-offices-snub-us-based-palantir-software/a-77160897
2•abawany•8m ago•0 comments

Amazon Ditches Rufus for Alexa

https://www.aboutamazon.com/news/retail/alexa-for-shopping-ai-assistant
3•jxyxfinite•9m ago•0 comments

Emergence World

https://world.emergence.ai/
1•DeathArrow•10m ago•0 comments

Overworked AI Agents Turn Marxist, Researchers Find

https://www.wired.com/story/overworked-ai-agents-turn-marxist-study/
3•ceejayoz•11m ago•0 comments

We open sourced Enclave's MLS Protocol encryption SDK

https://github.com/Enclave-Social/enclave-mls-sdk
1•JbraxtonEnclave•11m ago•0 comments

Why did Clovis toolmakers choose difficult quartz crystal?

https://phys.org/news/2026-04-clovis-toolmakers-difficult-quartz-crystal.html
2•PaulHoule•15m ago•0 comments

Show HN: OpenSpec – OpenAPI/Swagger explorer with a contract linter

https://openspec.vercel.app/
2•geox•17m ago•0 comments

How to Achieve Truly Serverless GPUs

https://modal.com/blog/truly-serverless-gpus
1•birdculture•17m ago•0 comments

70 years of love, empowerment, and freedom. A look at Eurovision by its lyrics

https://puntofisso.net/eurovision/
1•sebg•19m ago•0 comments

AlanLukacovic

1•AlanLukacovic•19m ago•0 comments

The AI Zombification of Universities

https://www.thenewcritic.com/p/the-great-zombification
4•rmdmphilosopher•21m ago•0 comments

Anthropic moves Claude Code SDK and claude -p out of subscription plans

https://twitter.com/ClaudeDevs/status/2054610152817619388
4•deviantintegral•21m ago•0 comments

Hoot 0.9.0 Released

https://spritely.institute/news/hoot-0-9-0-released.html
10•birdculture•22m ago•0 comments

Ask HN: Anyone have experience with infomaniak.com? Are they a scam?

1•OhMeadhbh•22m ago•1 comments

AMD will bring FSR 4 to RDNA 3 and RDNA 2 GPUs

https://twitter.com/jackhuynh/status/2054904153013387273
1•LorenDB•22m ago•0 comments

The Power of a Free Popsicle (2018)

https://www.gsb.stanford.edu/insights/power-free-popsicle
3•NaOH•24m ago•0 comments

Docker demystified: create your own containers in five minutes

https://discourse.openrobotics.org/t/what-are-you-using-for-containerization-in-ros-deployments/5...
1•chfritz•25m ago•0 comments

Just Aim the Cannon Correctly

https://www.jmduke.com/posts/difficulty-scores.html
2•speckx•26m ago•0 comments

Early Access Grok Build CLI

https://x.ai/cli
9•skp1995•26m ago•0 comments

SQLite affinity is stranger than it looks, a peek inside

https://theconsensus.dev/p/2026/05/06/sqlite-affinity.html
2•eatonphil•27m ago•0 comments

Brazil markets rattled by report linking Flavio Bolsonaro to disgraced banker

https://www.reuters.com/world/americas/brazil-markets-rattled-by-report-linking-flavio-bolsonaro-...
1•CXSHNGCB•33m ago•0 comments

Understanding the Linux Kernel: The Linux Kernel Startup

https://internals-for-interns.com/posts/linux-kernel-startup/
7•valyala•33m ago•0 comments

First public macOS kernel memory corruption exploit on Apple M5

https://blog.calif.io/p/first-public-kernel-memory-corruption
8•quadrige•33m ago•1 comments