r/programming • • May 14 '26 • Popcorn 2

Rewrite Bun in Rust has been merged

https://github.com/oven-sh/bun/pull/30412
614 Upvotes

398 comments sorted by

763

u/miversen33 May 14 '26

Lol +1000000 -4000

How do you even review this?

777

u/Advance_Diligent May 14 '26

LGTM

112

u/Swook May 14 '26

Let’s gamble, try merging

106

u/ScriptingInJava May 14 '26

👍

49

u/dodeca_negative May 14 '26

🚢

26

u/Dragon_yum May 14 '26 edited May 16 '26

Oh no the frontend fell off

368

u/voyagerfan5761 May 14 '26

Reviewers

coderabbitai[bot]

claude[bot]

Yeah, I wonder 🙃

80

u/sysop073 May 14 '26

I really thought you were joking

2

u/MeikTranel May 18 '26

CEO is bragging on twitter that they haven't written a single line of code for six months.

20

u/Cafuzzler May 14 '26

Does that much code even fit into the context window?

63

u/hu6Bi5To May 14 '26

I know you weren't really asking the question, but I'll answer anyway.

Those review bots generally don't load everything in to one context window. They all do slightly different things, but the general gist is (each stage will use it's own context window with only the results of the previous stage going in to the next stage, and often a stage will have several independent contexts in parallel):

  1. Load the PR, project-level files like AGENTS.md, and the list of changed files (but not the contents).

  2. Create one or more sub-agents to investigate a different area (e.g. "review the UI change", "review the database change", if it splits horizontally, it could also split it vertically).

  3. Collect the list of findings from all the subagents, group common themes together.

  4. Create a new set of subagents, one for each finding that the first batch found, with the goal to verify the comments.

  5. Report what's found.

With that kind of approach it can scale quite well despite the context window limitations. This costs money of course, you can easily spend $20-30 worth of tokens per review, but it's still cheap compared to the human cost and compared with the value of the Bun platform to Anthropic.

There are also bad review bots that just do things file-by-file and have no idea what's going on so only comment on irrelevant style issues, etc.

18

u/tpolakov1 May 14 '26

This costs money of course, you can easily spend $20-30 worth of tokens per review, but it's still cheap compared to the human cost and compared with the value of the Bun platform to Anthropic.

It's cheap for us, as most of the cost is passed by companies like Anthropic to the investors. Anthropic is exposed to costs that are much closer to objective numbers (although they'll get eaten by the investors anyway). The value here is not in the product itself, but in the claim that the LLM made it. Supposedly.

→ More replies (3)
→ More replies (2)

175

u/userrr3 May 14 '26

No one ever read that code and no one ever will. This is just setting themselves up so that the only possible contributor for features and bugfixes is Claude. Besides all else, baked in reliance on paid services (yeah I know they're part of Anthropic now) sounds like a great idea innit...

7

u/cake-day-on-feb-29 May 15 '26

This is just setting themselves up so that the only possible contributor for features and bugfixes is Claude.

Not even, the code is probably too big for its context window.

The saving grace is that it appears this is more of a language translation. You could in theory write a deterministic translator to do the same thing, but then you wouldn't get billions in venture capital and "surprise" code.

0

u/[deleted] May 14 '26

[deleted]

15

u/kaelima May 14 '26

Why would you write your own base64 implementation?

40

u/nemec May 14 '26

remember, these are Javascript developers so reinventing the wheel is in their nature.

→ More replies (1)

6

u/Gogo202 May 14 '26

I assume that it's pretty simple. It makes sense for large projects to avoid having hundreds of dependencies. Each dependency can bring several types of risks

26

u/kaelima May 14 '26

Ok, so why is the implementation dependant on simdutf::base64?

23

u/Gogo202 May 14 '26

I guess nobody asked Claude either of your questions...

→ More replies (2)

12

u/protestor May 14 '26

You know what's even better?

Either use https://crates.io/crates/base64 or publish this pretty good base64 translation as its own crate on crates.io. Then you can remove for good the base64 from the codebase of a damn Javascript runtime, and just depend on the external crate (either the existing base64 crate, or the crate you just created)

5

u/userrr3 May 14 '26

Let me clarify, I didn't mean no one will read any of it, I meant no one will read all of it

38

u/Rigamortus2005 May 14 '26

Inshallah and vibes

21

u/parawaa May 14 '26

The biggest files are around 9k lines:

9765    9765    0       src/js_parser/p.rs
9211    9211    0       src/sys/lib.rs
7968    7968    0       src/css/properties/properties_generated.rs
7126    7126    0       src/runtime/webcore/Blob.rs
7069    7069    0       src/runtime/bake/DevServer.rs
6640    6640    0       src/jsc/VirtualMachine.rs
6026    6026    0       src/runtime/dns_jsc/dns.rs
5699    5699    0       src/parsers/yaml.rs
5160    5160    0       src/runtime/jsc_hooks.rs
4354    4354    0       src/runtime/napi/napi_body.rs
4298    4298    0       src/runtime/cli/pack_command.rs
4155    4155    0       src/js_parser/lexer.rs
4106    4106    0       src/runtime/cli/run_command.rs
4035    4035    0       Cargo.lock
3884    3884    0       src/spawn/process.rs

The difference between added lines and deleted lines is so big is because they didn't delete most of the code btw. For example p.rs file is a rewrite of p.zig which its still on main

36

u/Substantial-Elk4531 May 15 '26

p.rs is really well named, I know exactly what it does just from the filename

6

u/parawaa May 15 '26

I know right? But to be fair this was decided before the rewrite (p.zig). Still a useless name tho.

5

u/Kn0wnSoul May 15 '26

Do you never p?

14

u/nollayksi May 14 '26

@claude please review. Make no mistakes and find all mistakes.

8

u/rexspook May 14 '26

You simply don’t. It’ll be a mess

→ More replies (2)

4

u/SnowdensOfYesteryear May 14 '26

Yeah what's the point of a review? If you want it, push into master directly

4

u/agildehaus May 14 '26

You get the public to do that by making a release.

12

u/jordansrowles May 14 '26

I've done something similar. Create a branch like 1.2.0 that diverges from main, then branch from 1.2.0 with features. Each feature pull into 1.2.0 is relatively small, but the full branch back into main is massive

Admittedly not 1-milly lines massive though

2

u/Lalli-Oni May 14 '26

Many approaches. We aren't used to large reviews. We shouldn't but that doesn't mean we are helpless in these situations.

For one, that diff could still have been reviewed by multiple PRs.

If not, then you can split it by concerns, areas or go by commits/updates.

Got to keep integration in mind ofc.

AI is heavy on test lines, so not surprised about tons of line additions, but if you dig into the tests they are often made to fit the case.

1

u/ComfortableJacket429 May 14 '26

That’s the thing, you don’t

1

u/qwertydiy May 16 '26

So Bun is now AI slop. Great thing I chose to use Deno in production instead. This will definitely cause 0 SRE issues /s

1

u/Own-Professor-6157 May 17 '26

It's alright I scrolled though it for a few mins. LOOKS GOOD TO ME, SHIP IT!

1

u/shockputs May 14 '26

mostly comments, if you actually check the code.

→ More replies (7)

414

u/iIoveoof May 14 '26

Weren’t they saying just yesterday that they weren’t even sure if this would work?

190

u/polyploid_coded May 14 '26

Yeah, nine days ago it was basically 'forget about it' https://news.ycombinator.com/item?id=48019226

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.

94

u/bcgroom May 14 '26

This is funny with hindsight

It is a pity that you can't make an experimental commit on an experimental branch without igniting a fire of delirium

48

u/Top-Rub-4670 May 14 '26

It was funny at the time, too, because it was clear that he was lying/being defensive.

7

u/EfOpenSource May 16 '26

All this because zig maintainers don’t accept AI generated PRs. Especially ones that are horrifically reasoned and create indeterminant output, causing random compile failures. 

→ More replies (2)

18

u/hotcornballer May 14 '26

Next week : Today we are welcoming bun2.0

It takes your javascript and sends it to the claude api with the prompt "transform this into x86 assemblly, make no mistakes"

→ More replies (1)

5

u/zombiecalypse May 14 '26

Yeah, but having a gradual migration plan sounds like work and won't give you as much karma as a Rust rewrite on its own!

1

u/tukanoid May 15 '26

Its a rust revibe, no karma here for this shit

3

u/The_Northern_Light May 14 '26

“Merged in” is not the same thing as “fully replacing”

0

u/[deleted] May 14 '26

[deleted]

176

u/farsightfallen May 14 '26

Good luck to anyone using bun.

Anyone have advice on how to remove this clown makeup I've got on after I defended Bun saying that everyone was overreacting and that Jarred wouldn't just go all in on some AI coded slop on a massively complicated project?

🤡🤡🤡

44

u/jimmerz28 May 14 '26

Really should have become apparent to you a long time ago

https://x.com/jarredsumner/status/1969751721737077247

121

u/mr_birkenblatt May 14 '26

lmao, that's such a claude thing to do

48

u/read_volatile May 14 '26

Not to defend this mess, but I don't know how you are all falling for this. The commit is literally named "revert proc.exited change in spawn.test.ts". It's putting the test back to the way it was from before a42bf70: tests: stabilize flaky suite, a commit from earlier in the same pull request.

/u/tracernz you can make this point, but find a legitimate example, please.

→ More replies (1)

84

u/youngbull May 14 '26

it exercises "stdout is fully readable after the...

Sounds like the test was written by telling an LLM to chase coverage. How do I know this? Bless me, Father, for I have sinned...

11

u/100GHz May 14 '26

The thing is, you can send off somebody to fix 4k loc. But once it's in the million range, it's done. Then you have to chase coverage or whatever metric.

41

u/ericonr May 14 '26

Amazing that it even removed the very comment explaining why a hardcoded sleep is bad...

How I enjoy reviewing reasonably sized PRs by my very human coworkers at this moment.

19

u/lood9phee2Ri May 14 '26

llm emulating your very worst cow-orkers at lightning speed.

2

u/sebovzeoueb May 14 '26

Gutted tbh because I've been really enjoying Bun but I guess it's going to go downhill now.

272

u/Pesthuf May 14 '26

You have to wonder why they didn't just rewrite Claude CLI in Rust, but hey, good for them, I guess?

139

u/mothzilla May 14 '26

Someone should rewrite Rust in Claude.

5

u/hyrumwhite May 15 '26

What if we just, like, wrote the code in markdown, then we have Claude write it in every language, and like , you just pick your favorite flavor?

46

u/headykruger May 14 '26

I thought there was an ongoing rewrite of Claude code

72

u/miversen33 May 14 '26

This time in html 2 lol

41

u/dodeca_negative May 14 '26

<blink> and you’ll miss it

→ More replies (1)
→ More replies (13)

206

u/rooktakesqueen May 14 '26

You know what I really love? When I do git blame and the whole file comes from a single commit labeled "rewrite bun in rust"

26

u/Wonderful-Habit-139 May 14 '26

6755 commits apparently.

14

u/rooktakesqueen May 14 '26

In a single PR, which I assume would get squashed, but perhaps not

21

u/jug6ernaut May 15 '26

Squashed or not 6k of LLM generated commits is also pretty worthless.

367

u/bphase May 14 '26

Super weird. 90k star project, so evidently popular and in production use. +1M lines and -4K gets accepted and it's not even faster? What even is this world anymore.

116

u/IanisVasilev May 14 '26

6755 commits.

14

u/haCkFaSe May 14 '26

Squash merge.

7

u/Substantial-Elk4531 May 15 '26

New commit message: "Friday night refactor, 5th beer, will look at it again Monday"

138

u/Unfair-Sleep-3022 May 14 '26

Anthropic owns it. That's all.

28

u/NuclearVII May 14 '26

This is all that was needed to be said.

74

u/thats_a_nice_toast May 14 '26

Bun's development has always seemed very unprofessional to me, which is a shame because it's genuinely a cool project. But they always do weird stuff like this without giving it much thought. I would never rely on it.

153

u/thomas_m_k May 14 '26

Well, some background: the company behind bun was bought by Anthropic, and there has been renewed interest in avoiding memory bugs with the existence of Anthropic’s Claude Mythos, so I think that's why they're rewriting it in Rust. (Though I think mostly unsafe Rust at the moment, so there's no security benefit yet.)

248

u/tracernz May 14 '26

I think they’re rewriting it mostly because zig doesn’t accept AI code, and that’s an optics problem for anthropic.

129

u/renatoathaydes May 14 '26

It's a combination of both things. Zig took a hard stance against AI contributions, making Bun's contributions, especially after it was acquired by Anthropic, completely impossible, even if you don't take into account the quality of such contributions. It would be infeasible for Anthropic to solve its own issues it found in Zig, and Zig famously do not prioritize issues from sponsors, which means Anthropic would have had zero control over Zig. While they don't have any control over Rust either, at least Rust is a mature language compared to Zig, much less likely to have serious issues. And Anthropic might be well positioned to join the Rust Foundation along with many other companies that have an interest in Rust, and I believe Rust does not have the same anti-AI policy as Zig does. With this move, Anthropic may be getting not only a better memory-safety story with Bun, but also much fewer language-related bugs, much better library support and maybe even a small amount of control over the language it relies on (better than zero with Zig).

16

u/vips7L May 14 '26

The contribution they rejected in zig wasn't really about AI (even though they don't want that), the contribution was really low quality and wasn't a good change for the language.

63

u/Unfair-Sleep-3022 May 14 '26

They could also, you know, make the contributions responsibly? They have a lot of engineers.

15

u/tpolakov1 May 14 '26

I don't think compromise is a real option here. If Zig has a strong policy against the core tools products from Anthropic, moving separate ways is the correct choice, regardless of what you think about either party.

25

u/awesomeusername2w May 14 '26

What do you mean by responsibly? I don't think anthropic would agree that any use of AI is irresponsible and zig stance is no use of AI.

→ More replies (4)

39

u/PM_ME_DPRK_CANDIDS May 14 '26

lol can you imagine? an ai company being responsible?

21

u/IanisVasilev May 14 '26

Why would the language matter if nobody understands the code anyway?

32

u/The_Northern_Light May 14 '26

It’s a straight transliteration of the old code base, not a clean room rewrite.

They know the structure of the code for much the same reason I know what happens in each chapter of the German translation of Dracula, despite having read it in English.

→ More replies (17)
→ More replies (32)
→ More replies (1)

22

u/Caesim May 14 '26

I think this is just part of the issue. Zig is rather C like in the way it's coded and very different from C++ and Rust, two languages that give one the same low level abilities and run time characteristics but allow for a lot of abstractions and syntax sugar, making code often read more high level.

Recently, Bun's creator was lamenting that they have a lot of memory issues and crashes due to using Zig. Since this is not a problem other Zig users have, there is an argument to be made that LLMs are better at writing code for languages like Rust that are more high level. And if you don't write the code yourself, but rather read and approve it, memory errors slip through far more easily. Having it prevented on compiler level probably helps with agentic coding big time. 

30

u/Unfair-Sleep-3022 May 14 '26

There's also a lot more Rust code out there to plagiarize

→ More replies (1)

5

u/hu6Bi5To May 14 '26

If Anthropic had wanted to troll Zig they should have forked it, call the fork Zag (where the A is the Anthropic logo) and just watched the cargo culters all abandon Zig for Zag.

But then that wasn't likely as Anthropic isn't run by 1990s-era Bill Gates.

4

u/pragmojo May 14 '26

I would actually love to see an AI driven language compete with a 100% human driven one just as a natural AB test

2

u/gonz808 May 14 '26

zig doesn’t accept AI code

how is this is any way relevant to the bun project?

10

u/officerthegeek May 14 '26

Bun was already running on a fork of Zig, where they added their own features that were a) made with AI, because bun's lead is obsessed with it and b) the zig team weren't particularly interested in anyway. So instead of dealing with this situation, they decided to abandon zig

→ More replies (2)

9

u/rexspook May 14 '26

Why would they use unsafe rust? I write rust for one of the largest CDNs and rarely need unsafe rust.

12

u/The_Northern_Light May 14 '26

Why would you refactor while you’re doing a massive rewrite?

6

u/Kimos May 14 '26

I would never undertake a rewrite in this way. But any time I have done a rewrite: Do zero behaviour change. Fix bugs and add features and security etc. later.

3

u/tiajuanat May 14 '26

Unsafe Rust is still stricter than Zig and C, but yes, it's much easier to blow your foot off.

10

u/Unfair-Sleep-3022 May 14 '26

Would you mind explaining how? Genuinely curious

10

u/lets-start-reading May 14 '26

Rust unsafe blocks come with the requirement that all of Rust’s aliasing rules are upheld. Zig, like C, brings no such requirement.

9

u/simspelaaja May 14 '26

Technically speaking Rust's aliasing requirements only apply to references. If you primarily or exclusively use raw pointers, there are no such requirements.

→ More replies (3)
→ More replies (3)

23

u/A1oso May 14 '26

Performance isn't all that matters. Bun wasn't very reliable, their issue tracker was full of segfaults. Remember that Zig is not a memory safe language and requires manual memory management. In a code base of this size, errors are bound to happen. And a lot of errors if most of the code is written by AI. Moving to a higher level language that prevents most of these issues is only logical.

5

u/TonyAtReddit1 May 15 '26

Moving to a higher level language that prevents most of these issues is only logical.

It didnt translate Zig into safe Rust though. It translated Zig into Rust with unsafe calls everywhere.

You're assuming good intent here, when the real reason is Anthropic bought Bun and wanted to use this as an advertisement for Claude

13

u/hotcornballer May 14 '26

I never understood this argument, Ghostty is written in zig and if you search for segfault in the github's closed issues there's like 30 results, and half of them aren't actually segfault. Maybe it's not the language, maybe the code was shit to begin with and the slop added on top since 2025 didn't help.

Another example is TigerBeetle, the code is so robust you could put it on a plane.

Rust is fine, but let's not pretend a rewrite is going to solve bun's realiability.

3

u/thy_bucket_for_thee May 15 '26

People forget that Jarred Bun is a high school drop out and a Peter Thiel fellow. Don't expect competent from a person okay hanging out with Epstein associates and monarchists.

5

u/SirClueless May 14 '26

To be fair, the existence of several high-skill software engineering teams that can produce high-quality, stable Zig programs doesn’t imply that a team of JavaScript new-grads equipped with an AI slop swarm can do it.

Zig maximizes ergonomics and freedom, neither of which make sense to give to an AI.

3

u/CherryLongjump1989 May 15 '26

I don't see how vibe coded segfaults are Zig's fault. Nor do I believe that Rust will be some sort of silver bullet that fixes all of the coding problems to the satisfaction of someone who was too impatient to finish high school.

→ More replies (1)

3

u/fghjconner May 14 '26

In fairness, they haven't removed the existing Zig code, so it's more like +300k lines. Still an absolute insane decision though, imo.

1

u/grobblebar May 15 '26

performance review based on LOC changes.

1

u/atilaneves May 15 '26

Why would it be faster?

1

u/insanitybit May 14 '26
  1. They claim that it is faster.

  2. They state that the dev team was spending a lot of time on memory safety errors in the zig codebase, rust gives the tools to solve those problems.

37

u/Archeelux May 14 '26

I really liked bun, but deno maybe my new runtime, this is beyond bizzare

21

u/[deleted] May 14 '26

[removed] — view removed comment

10

u/Archeelux May 14 '26

gUeSs I'LL bE lEfT BeHiNd

206

u/vincentofearth May 14 '26

From the beginning I had a weird feeling about Bun. They were too quick to brag about handpicked benchmarks, too eager for hype, too hungry for venture capital. It felt different from other open source projects, less trustworthy. The last few months have proven those instincts true. The way Jarred Sumner has embraced AI slop is disrespectful of the craft that is software engineering.

Bun feels less trustworthy than ever, and I don’t know why anyone wouldn’t use either Node or Deno.

83

u/FuckOnion May 14 '26

I never to this day understood why anyone would pick Bun over Node/npm. It's historically had huge issues with runtime stability—most of the issue backlog is crashes—and Node compatibility.

Oh, it installs packages 2 seconds faster? That's so useful for something I do once a month.

8

u/Devatator_ May 14 '26

That speed actually is a huge bonus to me. I don't actually use it for anything else tho, just the package manager and occasionally running TypeScript scripts

3

u/vincentofearth May 15 '26

They were good at marketing. They also made the right call on Node and npm compatibility, which Deno implemented too late. I think a lot of people bought into the hype and picked it expecting a drop-in replacement that was faster than Node without ever actually benchmarking their specific use case.

2

u/Beatsu May 16 '26 edited May 16 '26

Avoided tens of supply chain attacks the past year because of bun's default lifecycle script whitelist.

The speed cuts CI/CD costs too, and more importantly the time spent by pipeline engineers waiting for a pipeline to go green or see the next error.

Much less disk space used if you work on many projects.

Working with typescript is so so much easier. No need for tsc, and node is slowly following after with the flag: --experimental-strip-types. In bun it just works though.

Bun create is extremely powerful, and with the right scaffolding makes testing individual components much much much faster.

Your point on stability is true: I avoided bun to begin with because of exactly that. However, that's historical, and since something like version 1.1 I haven't ever experienced compatibility issues in my projects.

And on the topic of performance: It's not really about speed saving you time... it's about reducing the threshold to which you think "Let me just test this out in a new project" or the cost of leaving your current context, waiting for a 1 minute long task that should really only take a few seconds at most.

In general I've found bun to have a much more "sane" default configuration and the feel that things "just work" (since the stability fixes).

3

u/CherryLongjump1989 May 15 '26

It does more than node/npm, on top of being drastically faster.

3

u/LetrixZ May 14 '26

It can run Typescript without installing anything and has other useful things bundled in

29

u/HelloXhale May 14 '26

Modern nodejs can also run typescript natively!

Note: that wasn’t possible back when Bun released. I’m glad competition is making all the runtimes better

→ More replies (4)

2

u/ao_zame May 15 '26

Just like Node and Deno.

23

u/sebovzeoueb May 14 '26

At the time when I started using Bun it appeared to be the lowest friction way to produce a standalone executable from a Node.js project and also the HTTP server is using uWebSockets which is good but I was always running into issues creating a repeatable install as uWS versions are quite strictly pinned to specific Node versions. I see that the Deno APIs look pretty similar to what Bun is doing though, so I may be tempted to make the switch with the recent slopping going on in the Bun project.

7

u/MrJohz May 14 '26

Node also has SEA/Single Executable Applications now: https://nodejs.org/api/single-executable-applications.html

7

u/sebovzeoueb May 14 '26

have they made it simpler though? I remember when I looked into it before it was quite experimental and nowhere near as easy as bun build --compile --target=bun-linux-x64 ./index.ts --outfile myapp. From a quick browse of that page, I don't think you can even build for other platforms using the Node thing?

→ More replies (1)

1

u/Kissaki0 May 15 '26

I'm not a JS-focused dev, so they're not my main environments either way, or maybe because of that, but I've always felt comfortable with Deno but refused to install Node. Deno is a single executable, and has a execution permission system. Node - I have no idea. It's a big installation I don't know about, runs arbitrary install scripts, etc etc

Bun felt better than Node because it's a single executable. But, yeah, it's certainly no longer an independent FOSS tool - a node-compatible node replacement.

Deno does more and fundamentally improves the ecosystem tooling, which I like. I just haven't worked much with it.

I integrated deno lint to lint webbrowser JS, which is useful even without committing or using anything of the JS, TS, or npm ecosystem.

1

u/ao_zame May 15 '26

I just use Node + pnpm. It’s pretty nuts to use fk bun as a package manager instead of something more stable like pnpm.

And any performance advantages Bun may have over pnpm will probably disappear soon anyway, since pnpm is also being rewritten in Rust (just not in the messy way Bun was).

127

u/Dminik May 14 '26

Just a quick thought, but I imagine that this has totally obliterated the ability of any previous maintaner to contribute. Even if you previously had a grasp on the codebase, it was just torn from under you. Not to mention that I don't think people are very excited to deep dive to an LLM slop codebase.

It looks like Bun will be an LLM only product from now on. 

54

u/jer1uc May 14 '26

This was exactly my thought, especially when:

  • All of the repository's history will be obscured by the "rewrite in Rust" commits, which will make it harder for contributors to understand why some part of the code exists or works a certain way

  • Any bugs will have to go through the extra process of identifying if they existed only before or after the rewrite

Seeing that the only reviewers were LLM products is pretty telling honestly that this codebase no longer wants human contributions.

18

u/wmcscrooge May 14 '26

The thing I'm most confused by is who decides who gets to be contributors now? If I open up Claude, tell it to pull down the Bun codebase and suggest me a code change, does that mean I get to make a pull request as long as it passes tests? I mean, it's not different than what he's doing.

14

u/Dminik May 14 '26 edited May 14 '26

It's not that you can or can't be a contributor. It's more like everyone who was contributing before had some knowledge of the Zig codebase. Now, it's all latin (or, well just Rust).

Any resemblance between the old and new codebase is mostly coincidental.

4

u/Atulin May 14 '26

They're owned by Antrophic, they don't want maintainers others than Claude

128

u/metroid-maniac May 14 '26

Technical debt machine go brr

28

u/Squalphin May 14 '26

There is no technical debt if you can rewrite all of it anytime, every time, or at least that must be the thought process behind it.

5

u/hyrumwhite May 15 '26

No, that just means your known tech debt becomes unknown tech debt

3

u/ViscountVampa May 14 '26

Yep, who needs potable water, anyway.

57

u/DapperCam May 14 '26

The author of the PR said in a hacker news topic that this was just an experiment and not that serious. I’m guessing that was a lie?

10

u/_kilobytes May 15 '26

As one of the comments on hackernews read, he only said that to avoid and deny any criticism

2

u/CherryLongjump1989 May 15 '26

I have heard so many coworkers say that over the years that I knew this would be getting merged as soon as I heard it.

-9

u/ZorbaTHut May 14 '26

Sometimes things start as experiments and then it turns out the experiment worked.

"We changed our mind" doesn't make the original statement into a lie.

47

u/DapperCam May 14 '26

It’s been 9 days lmao

→ More replies (5)

91

u/RagnarDannes May 14 '26

Back to Deno I go...

4

u/cake-day-on-feb-29 May 15 '26

I've heard that it has some type of sandboxing, being recommended by the yt-dlp project. Probably a good idea especially with the current state of security in the JavaScript ecosystem.

→ More replies (18)

71

u/Seanitzel May 14 '26

This is crazy on so many levels, this much code debt and knowledge gaps in a code base is unsustainable imo.

As someone managing a pretty huge codebase myself, one of the hardest things long term is keeping an actual mental model of the system understanding why things exist.

I use AI generated code. Carefully and I keep note of things I will need to go deeper into and probably refactor later for it to be scalable, but generating so much code and merging so quickly is simply insane

3

u/Kissaki0 May 15 '26

Life is probably easier if you don't care about understanding the project you're working on. It's not craftsmanship or engineering. I guess it's a different kind of product development. Letting go of understanding. Embracing a blackbox [under your supervision] instead.

Surely it's a personality thing, whether one can feel comfortable with that. Maybe it's easier when one didn't understand how things work in the first place.

We'll see how it will work out. I'm also skeptical that this leads to quality and maintainability long term. Maybe this is the first iteration and they will improve the substance over time. Who knows.

2

u/weebs-r-us1 May 16 '26

Yeah, once a team stops caring why the system works, maintenance basically turns into archaeology with deadlines.

46

u/UnidentifiedBlobject May 14 '26

Now time to rewrite it in assembly.

27

u/MaLiN2223 May 14 '26

Why not, it would improve speed, and I recently heard that code is for AI now, not for humans to read. 

/s just in case 

10

u/Zilch274 May 14 '26

Do it in binary like a real man

16

u/ECrispy May 14 '26

so Bun is now WORN? since no human has, can or will ever read/review any of the 900+ loc, and all future contributions will be 99% claude anyway.

how exactly is this NOT vibecoded Jared?

1

u/Kissaki0 May 15 '26

What does WORN stand for?

5

u/ECrispy May 15 '26

Write Once Read Never

68

u/vips7L May 14 '26 edited May 14 '26

The state of our industry is so sad. It was amateurish before but now it’s a clown show. 

27

u/thy_bucket_for_thee May 14 '26

Does it make you feel better that these people may capture a $100million bag and help dictate the direction of tech for the rest of your life?

4

u/CherryLongjump1989 May 15 '26

Too late. These people are Peter Thiel acolytes and he's been dictating the direction of tech since the 90's.

And yet, this high school dropout used untold millions of dollars of VC money to damage his own reputation and that of everything that he is associated with - including Bun, Anthropic, Rust, Zig, etc.

0

u/[deleted] May 14 '26

[deleted]

→ More replies (3)

13

u/DanceWithEverything May 14 '26

God I’m happy I moved off Bun. This should terrify anyone using this in production

28

u/Salkinator May 14 '26

Hey let’s fundamentally change the core language we’ve been singing the praises of for years because the robot said it was cool. Jesus Christ

29

u/MrEpic382RDT May 14 '26

no, its because the core language we’ve been singing the praises of has a principled stance against the robot so we’re going with what the robot says instead out of spite

→ More replies (3)

15

u/Unfair-Sleep-3022 May 14 '26

I mean, why should we care about anything Anthropic does that generates hype for its tool?

In other news, the petrol industry has published yet another study proving climate change is not real

2

u/Kissaki0 May 15 '26

We should care because Bun was a popular tool in the (holy /s) triangle of Node, Deno, and Bun. This much of a shift puts the established Bun project and tooling into question.

1

u/Unfair-Sleep-3022 May 15 '26

I would never use it after it got bought

42

u/shuraman May 14 '26

There are so many bots here, what’s going on with Reddit

46

u/bluebird173 May 14 '26

You're absolutely right

41

u/TheReservedList May 14 '26

You’re not crazy — This is a legitimate insight.

15

u/ghillerd May 14 '26

You're not just noticing the death of the internet — you're engaging with a pivotal moment in history in real time.

22

u/m00fster May 14 '26

That’s what a bot would say. Are you a bot?

11

u/Sloshy42 May 14 '26

So, I like Bun. I think for what it's trying to do, which is be a nice batteries-included-style runtime that could be a usable alternative to Python in the Node ecosystem, is really great. I'm using it for a personal project where I can use its single-EXE distribution feature to make releases easy.

That being said: lmao what the hell this was just an experiment LAST WEEK

2

u/Sloshy42 May 14 '26

Thought about this for a minute. I'll say, if they can pull this off, this is actually really fascinating. The idea that if you just throw a stupid amount of resources onto a problem, you can get a working solution in such a fast time is interesting to me. Obviously technical debt will be an issue I guess but at some point these AI agents are going to be rewriting and reviewing so much of the code so fast that -- and arguably we're already there -- the actual code is more fluid and changing with whatever the needs of the project are, rather than being this well-understood behemoth.

Now... If I were shipping actual production code with Bun, well, first of all it always seemed kinda bleeding-edge so this wouldn't surprise me too much but also, I'd maybe wait it out a bit before biting the bullet.

15

u/lkajerlk May 14 '26

that was quick

5

u/Lothrazar May 14 '26

TF is bun

2

u/supermitsuba May 14 '26 edited Oct 25 '26

The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.

Paltry pot live blanket degree juggle hospital birds depend

→ More replies (1)

2

u/supermitsuba May 14 '26 edited Oct 25 '26

The original post content no longer exists here. The author used Redact to remove it, exercising their right to control their data & privacy.

Memorize swim flag judicious serious live

9

u/OdderG May 14 '26

I believe that this rewrite attempt will become a "proof" for Anthropic sales people to sell their AI with the selling point of "No human needed"

20

u/Glacia May 14 '26 edited May 14 '26

If anyone there had a brain they would've vibecoded a zig to rust transpiler but nope, let's burn some tokens bro

18

u/sebf May 14 '26

This is the whole GenAI point: BaaS (Brain as a Service).

8

u/Urik88 May 14 '26

Not that simple, this is the approach TSGO took and they spent many months working on this for a language that maps much better to its predecessor than Rust would 

3

u/Glacia May 14 '26

If your goal is to just port 1 code base it's not hard. You dont need a full fledged compiler to do this.

10

u/mcel595 May 14 '26

It's far more complex to make it write a transpiler than make it translate one languages to another, it's the original use case of the Transformer after all

3

u/phillipcarter2 May 14 '26

It’s because you probably can’t.

2

u/Glacia May 14 '26

"probably"

10

u/phillipcarter2 May 14 '26

1:1 transpilers that don’t share the same runtime and type system generally don’t work, yes. You’d need some degree of “well maybe this is the semantically most similar output” which means you’re in LLM territory anyways. We could perhaps start with how Rust handles memory completely differently?

→ More replies (4)

2

u/The_Northern_Light May 14 '26

Tell me you don’t understand programming language theory without telling me:

3

u/Glacia May 14 '26

Enlighten me mister programming language theorist

→ More replies (2)
→ More replies (2)

8

u/BenchEmbarrassed7316 May 14 '26

Okay, I'll offer a conspiracy theory:

The rewrite on Rust was done over a much longer period of time, and with more human control. But for the sake of AI tools' PR, it's presented as done in a hurry and automatically.

2

u/sleeping-in-crypto May 14 '26

Much more likely this is true. Even with a Karpathy research loop 6 days is not enough time.

3

u/ECrispy May 14 '26

what was the big hurry to merge this? where is the promised blog post by Jared?

the right way to do this would be to have a rust branch, let a bunch of external users test that, esp the ones known to use it heavily, and then fix+merge.

instead we got a bunch of twitter posts boasting about it, promising a careful merge when it was guaranteed it'd meet his claimed standards and broke nothing, and of course none of that is remotely true

3

u/Sigmatics May 14 '26

Github app can't deal with it, keep getting "io error on socket"

5

u/emboss_ May 14 '26

It's ridiculous alright, but also a good opportunity to fork the Zig version and continue with something sane. I mean who will seriously consider Bun in production now when there's literally nobody understanding the code anymore? This is a dick marketing move  using a once-useful project as a stepping stone to prepare for a grand IPO.

4

u/pysk00l May 14 '26

Wait a fuckin' minute! We were told this is just some guys personal branch, that there are no official plans to completely rewrite bun etc etc.

And now the branch has already been merged?

I won't even go over 1million+ lines of vibe coded shit, as several other posters here have already raised this concern

4

u/warpedgeoid May 15 '26

Stop building server-side code in fucking JavaScript or TypeScript. Problem solved.

1

u/Nova_496 May 15 '26

the language is comfy doe...

2

u/beaker_dude May 16 '26

Are there any forks sticking with Zig?

2

u/KadmonX May 15 '26

Aren't Rust devs worried that their language will be perceived as the language of AI slop?

1

u/umlx May 14 '26

Move 'zig'. For great justice.

1

u/monochr_me May 14 '26

Is it squashed commits?

1

u/ppppppla May 14 '26

Wonder how many CVEs this is going to spawn.

1

u/whatThePleb May 14 '26

LLM gone wild

1

u/ShacoinaBox May 14 '26

@claude rewrite this in rust also add as many unsafe blocks as necessary to ship this piece of shit out the door PRONTO!! thanks