Electrobun 2.0 will be decoupled from Bun due to the Rust rewrite

1 day ago (twitter.com)

https://xcancel.com/YoavCodes/status/2058064720553222567

I have to say, this whole saga is extremely interesting. Not just from a popcorn-enjoyer's point of view, but as a bit of a bell weather for 2026 software dev.

  • Trivia: The term is "bellwether," i.e. a wether (castrated sheep) wearing a bell, used to guide the flock.

    • I kept checking the thread for responses and finally realized it, but too late to edit. I will probably wake up in a few days from a nightmare about this misspelling on HN. Happens all the time, no joke.

      I think that in my mind, it was always some sort of weather related bell, like you ring it, when the weather changes.

      Hopefully the sheep reference will help me remember.

      2 replies →

    • I have ADHD. I am super sensitive to noise. When other people let their phones ding incessantly, it drives me crazy.

      I went hiking in Albania recently. I saw many sheep grazing in the mountains. I wondered about the sheep chosen to wear the bell. Like, was it the same sheep every day? Did the chosen sheep think, "Fuck me this thing is annoying"?

  • What's funnier to me is none of them seem to want to abandon npm which keeps getting exploited and hacked. NPM has been the source of just how many industry wide hacks? Three major ones, and a massive supply-chain industry wide campaign against npm. But yeah, bun is the real concern here.

    I think we need to smell the coffee and review npm and scrutinize it because it is getting dangerously out of hand.

    • Who do you mean when you say "none of them"?

      At the least, my interpretation of deno lore is that they tried to ditch npm and found this limited their adoption so significantly that they had to patch it back in. That would provide sufficient warning to me that attempting to move away from npm was unwise.

      1 reply →

    • > none of them seem to want to abandon npm which keeps getting exploited and hacked

      Do you know of a better alternative for JS/TS that has all the popular packages?

      1 reply →

    • I really think the actual problem is not the vibe coded aspect, nor questions about supply chain security. It is the apparently reckless and rushed nature of the rewrite which eroded user trust. In the span of about 2 weeks the narrative went from being an experimental branch to be being deployed as a canary ready for public testing. All the while the Jarred from Bun was posting here, promising blog posts and more transparency about what was going on. All that I can find is a single AI generated post (https://bun.com/bun-unsafe-audit) after people raised concerns about the quantity of unsafe calls in the Rust rewrite.

      This is ridiculous and the response is entirely expected, it’s not about the code anymore, it’s about people. If you claim that doesn't matter, then I think the user response tells you otherwise. It signaled that Bun was not being transparent while asking people to trust it as a core runtime system. Why would I trust a runtime that actively would just do major changes so callously? There’s a balance between all of this. You don’t need to be as methodical as Python is now with PEPs. I think Swift got similar crap, though, nowhere as bad when it rolled out major language changes out of the blue to support Apple’s own product needs a few years back. This was kept secret and released in one burst, bypassing the entire Language Evolution process they crafted for Swift. Apple’s actions are more understandable by the nature of the company wanting to keep some things under wraps, even though it did erode trust somewhat. Apple is now a 50+ year old Fortune 100 company and Apple engineers really just kinda demurred on the bad taste it left in the community’s mouth, but at the same time, what do you expect from a company with a long history of being rather tight-lipped on major product changes. Bun has not really built this reputation nor has their parent company, but they are asking for that here and I just don’t think they have the leverage to do it.

      They could have done this more methodically, made sure that the community and industry were okay with it. Maybe they actually did this more thoughtfully behind the scenes and this entirely a marketing stunt, but their lack of transparency at this moment makes it difficult to give them the benefit of the doubt. Trust is currently in short supply, burning it up on stunts like this is stupid.

      4 replies →

    • Hi. Electrobun creator here.

      I am building a new JS runtime called cottontail.

      It’s just a prototype now but the goal is to have a huge standard library powered by native zig such that you don’t need npm.

      So you’re right that npm is a disaster and I’m working on solving.

    • From my perspective it is a synthesis of "It is difficult to get a man to understand something, when his salary depends upon his not understanding it." and "but npm is the source of all the shiny shiny!".

  • Time will tell. I predict this is just the same 20 year pattern of: people on the internet are irate about $latest_thing, and everyone will move on to some other hot topic.

    • But surely, whether or not the Internet mob moves on has no bearing on what actual lessons to learn from this saga. Will the vibe rewrite turn out to be a disaster or are LLMs already capable of writing human level code at this scale? That question is interesting no matter the level of attention this gets.

      2 replies →

    • For some reason, when thinking about this, the visual of all the scientists at CERN camping out for the results of the Higgs Boson experiment jumped into my mind.

      This is not as big an experiment as that. But, for software dev, it feels very significant.

    • The same thing happened when MS acquired Github. So much outrage and so little action of moving to Gitlab.

  • Exactly, I'm glad bun has done this because it will be fascinating to see how it plays out.

    I'm also glad I don't use bun

  • I wonder how many "behind the curve/not super modern" corporations were using Bun or Deno to begin with.

    Part of me thinks it's a mild overreaction. It's not like people audit every line of kernel/driver/BIOS/EFI code before running Linux? As long as the tests pass and the performance doesn't regress and it's secure... why are people so mad that it was vibe coded? Is it because it was an irresponsible thing to do? Maybe?

    I don't know, I see both sides.

    • > as long as the tests pass

      To be pedantic, tests prove that the code passes the test suite, nothing else. They do not prove by themselves that the code is correct, secure, maintainable, efficient, etc. Those are much harder to measure and have a ton to do with organization, architecture, culture, shared knowledge of the maintainers, etc. All of which is lacking during and after this rewrite.

    • > As long as the tests pass and the performance doesn't regress and it's secure... why are people so mad that it was vibe coded?

      Because the chances that they had a test suite that was actually comprehensive enough to guarantee correctness through this kind of refactor are approximately zero.

      Normally we combine tests with careful "correctness by construction" design work and code review because we know that tests aren't sufficient.

    • It isn't about users auditing Linux. The Bun developers don't audit "their own" (stolen) vibe code output. How would anyone know if it is secure?

    • > It's not like people audit every line of kernel/driver/BIOS/EFI code before running Linux?

      That's basically Torvolds full time job?

  • People are going to be using a lot less software if the selection criteria include not being no agents.

    • This is a very uncharitable interpretation of the twitter post: "It’s a combination of anthropic’s stance of not doing human reviews or any kind of rational roll out and stabilization."

      They mention nothing about agents being used, rather focus on humans in the review cycle and some sort of gated roll-out process. Why we would bin these practices in the name of a faster release cycle is an important question & debate.

      9 replies →

    • There was enough software that powered the Internet before 2023. We don't need laundered slop from criminals.

Electrobun repo: https://github.com/blackboardsh/electrobun

> Electrobun aims to be a complete solution-in-a-box for building, updating, and shipping ultra fast, tiny, and cross-platform desktop applications written in Typescript. Under the hood it uses bun to execute the main process and to bundle webview typescript, and has native bindings written in Objc, C++, and several core parts written in zig.

I think it makes sense to stay away from large code bases built using LLMs until it is proven that it is possible to also maintain such code bases using LLMs or using reasonable human effort.

  • It's alarming how people instantly jump to conclusions that Bun is now "AI slop".

    Bun has been almost entirely worked on by LLM's for ~6 months now, long before the Rust re-write (source: https://x.com/jarredsumner/status/2054525268296118363). It already has been proven that LLM's can maintain such codebases.

    • Bun never was great in terms of stability. It has been vibe coded for 6 month but code was reviewed by a person.

      >It already has been proven that LLM's can maintain such codebases.

      Proven is a strong word. In my experience AI fails miserably at anything beyond junior level tasks. We will see soon, once bun goes into production.

      17 replies →

    • > It already has been proven that LLM's can maintain such codebases.

      Is it? Seems like bugs in Claude Code are getting out of hands. That project has a bit more lifetime.

      4 replies →

    • > It already has been proven that LLM's can maintain such codebases.

      It hasn't. Those are two different scenarios. The first is individual PRs into an existing, majority human-authored and understood codebase where the PRs are initiated and merged by humans even if the code is AI generated. The second is AI rewriting AI written code that no human eye has seen. Bun took a conservative, transliteration file-by-file approach so they still understand the data structures and architecture so they will probably be okay though.

    • Worked on by LLMs is fine, but the rust pr proved no one is reviewing anymore. You cannot review 1M LOC in 5 days.

    • > Bun has been almost entirely worked on by LLM's for ~6 months now

      So what you’re saying is that this boycot is 6 months overdue?

      1 reply →

    • It's alarming how people are willing to overlook the obvious in-your-face sloppiness of the Bun rewrite. A million lines of code in 9 days, pushed to main branch, forced on the existing userbase irresponsibly.

      Nobody understands the code, nor will they be able to maintain it without AI service as an external dependency. Give me a break, I'm not running that monstrosity on my machine. Everyone running production software should move away from Bun purely as a technical decision.

      8 replies →

    • 6 months is plenty of time to keep ignoring serious tech debt. I don't think your conclusion follows at all from such a short time.

    • That explains the massive rise in segfaults since they got acquired.

      It’s approaching being as buggy as claude code which I’ve had to stop using even though I have 6 months free of max because it just crashes and freezes all the time.

  • I have an idea on how to tell if a codebase is rotting under AI Agent maintenance. We can collect and analyze how the coding agent reads code during programming tasks, and see if the code access and token consumption are steadily increasing for similar development tasks. If the code readability doesn't degrade for the agent, the maintainability of the codebase should be fine.

    • We judge long-term quality of human codebases (at least OS) by ongoing activity; for LLM codebases maybe a consistent or increasing level of activity is a bad smell?

Great, the author speaks out what everyone thinks but cannot say, either due to being invested in the hype or due to effectively having a gag order from their employers:

https://xcancel.com/YoavCodes/status/2058170216408813583#m

The bun rewrite was Anthropic's Vietnam and the open source community needs to react and and build resistance.

  • In many a brand name company now tokenmaxxing is the name of the game; CryptoBase, FacePaper, AntiqueOptics, tinyflacid, they all use AI usage metrics as part of their perf review these days.

I’m confused, isn’t this rewrite still unreleased as of today? Surely people understand that a simple, “do an audit for memory safety” will bring it up to par.

While I'm certainly sceptical of pure LLM (re)-written software, I would have to assume in the case of the cyberattack vector that Anthropic used their new Mythos model to adequately test against.

Maybe someone has more info of them mentioning that.

  • > to adequately test against

    How does one determine what "adequate" looks like for a million lines of code?

    You can't fit a million lines of code in a 1M token context window unless every line of code is one token. So you're just sort of praying you spend enough time/money burning tokens to shake out all the stuff that's bad or wrong.

  • I wouldn't be surprised if the kinds of security issues LLMs tend to create are the exact types of security issues LLMs are bad ar detecting.

  • so they are defending the LLM-generated code using another one of their LLMs, against attacks from yet other LLMs? So regardless of the outcome and impact on us, they win?

  • They want us to believe Mythos was so bad it kept shipping segfaults for the last 6 months.

    And also that it’s capable and trustworthy enough to rewrite the whole runtime in another language flawlessly such that no human needs to code review?

    Idiocracy.

  • Jarred said this had nothing to do with Mythos or Anthropic.

    • I have a very, very hard time believing that. Surely the acquisition left his wealth largely in the form of Anthropic stock, so his personal definition of success is "rep Anthropic so my stock goes up" and at that point he has succeeded.

      Me, I still have to be competent to succeed. I don't just get to declare that because I used AI the effort was a success, and I have 0 desire to work with those kinds of people.

This is my first time hearing about Electrobun it sounds like it could be a good alternative to electron. Their site mention CEF bundling as an option has anyone tried this?

Personally I am confused by this whole rewrite - the 'crown jewel' of Bun is Webkit, which is written in C++, which is 'unsafe'.

This seems like Tauri 2.0 - wrap something in Rust and claim the memory safety issues are gone.

  • The author was pretty clear about his motivation on the language. It's to make it more sustainable for them to maintain bun (instead of directly making bun safer), but the former can and often will result in the latter.

At this point I am wondering if anyone will be forking the Zig Bun to something else.

It’s really only a matter of time until someone forks the Zig version of Bun.

What a slap in the face to all the Zig developers that spent their time, effort and probably even some money contributing to it.

  • Realistically speaking, when Anthropic acquired Bun, they naturally would have needed a narrative showcasing that their AI excels even at relatively new languages like Zig. But since the Zig camp explicitly declared an anti-AI stance, it makes perfect sense why things played out this way. It's a understandable business realit

  • [flagged]

    • To upper-middle class people, their job is a religion. Investing in a programming language is a decision to gamble thousands of hours of your life for a programmer. At some point of projects shifting away from your language, your mortgage and your children's tuition will be affected.

      4 replies →

This makes a lot of sense.

For example, we (and many others) depend heavily on numpy. It's been around for decades and heavily battle tested. If someone came out with a new version of numpy vibe-code rewritten in a week, with assurances that "all tests pass", do you think we would adopt it? Absolutely not. We would have no confidence that there aren't some latent bugs or that we can fully trust the results.

It has nothing to do with AI having rewritten it, it has to do with being battle tested over time. If a team of humans had rewritten it in a week, I wouldn't trust or use it either.

  • >it has to do with being battle tested over time. If a team of humans had rewritten it in a week, I wouldn't trust or use it either.

    "it was made in a week" gets repeated a lot on HN, but the PR wasn't a release. They've been working on the rust rewrite for more than a month and it hasn't shipped.

    • > They've been working on the rust rewrite for more than a month and it hasn't shipped

      doesn't make any difference

      the point is, users haven't been using it for years, like the original

      there is absolutely no way that you can internally test all the use cases that users encounter, especially with such a large code base

I feel like all the replies have totally missed that this Rust port has (reportedly) thousands and thousands of "unsafe" statements and no human review; I'm no rust dev but that doesn't make me very confident, and probably won't consider Bun for new projects either

I'm not joining the chorus condemning Bun for the vibe-rewrite, and I think it's fascinating whether it turns out to be a complete trainwreck or not. But FFS, it should have been a separate repo.

  • What? Why? Git has branches...

    • They're two completely different codebases... even if they are 100% feature parity, it's 100% different code. They should absolutely be separate from each other, with different issues lists. Clean separation of two different codebases isn't a strange concept...

      2 replies →

    • Right, but it's my understanding that it was done as a PR that was merged to `main`. Sure, anyone could find the last Zig commit and branch off of that, so I guess it's all po-tay-to po-tah-to.

This whole thing of shunning bun is a goofy protest against AI in general by a bunch of programmers about to transition from vastly overpaid to mostly unemployed, sometimes thinly disguised as quality concerns and piggybacking a little bit on the anti-"rewrite it in rust" train.

Still, I can't help but entirely support it. I don't want hard dependencies on gigantic megacorps, or on any single provider who can go rogue. Should have always been able to switch between them, and any of them who made that difficult should have been the ones to be shunned. Completely dropping support for bun is equally bad imo, because now your choices are limited to Microsoft and deno, making deno close to a single point of failure.

Although I have to wonder what would happen if Anthropic threw a couple of bucks at electrobun (lol, not really.)

  • > This whole thing of shunning bun is a goofy protest against AI in general by a bunch of programmers about to transition from vastly overpaid to mostly unemployed, sometimes thinly disguised as quality concerns and piggybacking a little bit on the anti-"rewrite it in rust" train.

    It is interesting how you find millions of people put on the street “goofy”, all while concentrating wealth in the hands of a couple of hyperscalers.