Bun 1.4

(bun.com)

132 points | by meetpateltech 2 hours ago

25 comments

  • yagop 0 minutes ago
    "We receive a lot of contributions from the community, and we'd like to thank everyone who fixed a bug or contributed a feature in this release."

    I filled a bug https://github.com/oven-sh/bun/issues/34588 and a PR but my name is not on the blog :(

  • cube00 2 hours ago
    It's weird their promotional video repeats "you can do <million things> without installing dependencies", if I want headless browser testing is that wrong to install a project that offers that?

    Why would I want everything reimplemented in this massive binary? Why would Bun be anymore in touch with nuances of all these different technologies then individual projects dedicated to their own speciality?

    JS Runtime, Package Manager, Test Runner (both unit and headless browser), Bundler, JSX, PosgreSQL/MySQL/SQLite drivers, S3 client, Redis client, Formatter, Linter, etc.

    Not to mention parsers for YAML, TOML, Markdown which are easily three separate projects worth of complexity in their own right.

    I guess one clear downside is to get all these great features they're pushing for 1.4 you needed to wait until everything was ready. Given 1.3 was pushed out in October 2025, a 10 month release cycle across so many large technologies is tough. Before you give a pass because of the Rust rewrite Bun 1.2 was released in January 2025

    I have to respect Jarred knows how to work the algorithm, 10 carefully crafted X teaser posts for this release spaced out over 72 hours https://xcancel.com/jarredsumner

    • preommr 1 hour ago
      > Why would I want everything reimplemented in this massive binary? Why would Bun be anymore in touch with nuances of all these different technologies then individual projects dedicated to their own speciality?

      It's funny because the top article on HN is about a malicious rust crate package, and people keep making comparisons to js/npm and how both language suffer from frequent security issues because they have weak std libs.

      • andai 1 hour ago
        I saw a post recently about how LLMs are much more effective in Ruby on Rails because it's batteries included, so you don't get so many implementation details crapping up the context window.

        I assume the same benefit applies to humans as well!

        • DanielHB 20 minutes ago
          I am not into the Ruby on Rails world, but I find LLMs much more effective with powerful type systems like Typescript. Especially if you nudge it to keep things strict and (statically) eliminate invalid states. Do they use similar systems (build-time typing) for Ruby?

          When the LLM can verify its own output by running static analysis they produce better results. They also seem to understand type definitions and avoid going to the source which, in theory, should reduce context size.

      • duped 32 minutes ago
        Something that frustrates me about that discourse is that people argue about the mere existence of dependencies but all 'supply chain' (1) attacks are issues over when dependencies change. Dynamic systems are harder to reason about than static ones.

        (1) scare quotes because I think it's dumb for us software people to call code we picked up on the side of the road part of a 'supply chain' like that means anything.

    • Jcampuzano2 1 hour ago
      Its strange how flip floppy the JS ecosystem is, because go back literally 1-3 years or so and the BIGGEST complaint was the lack of a standard library and having to use a package for everything.

      But now that Bun is actually doing it its somehow bad? Its also still open source, so those implementations you mention need dedicated teams can still get the attention they need by the community if needed.

      I'm on the side that I'd actually prefer if node included more out of the box and we could drastically cut down on the number of packages we need due to the amount of supply chain attacks that happen on packages in the node ecosystem.

      • optionalsquid 1 hour ago
        Is that flip-flopping or just different developers having different preferences? Those who complain now would have had no reason to complain back then, and vice versa
      • pier25 1 hour ago
        I agree and I also wish Node did more.

        Otoh should a standard lib give you absolutely everything? Probably not. There needs to be a line somewhere.

        Right now Bun’s policy on this seems to be "whatever Jarred feels like should be in there".

        • erlich 1 hour ago
          > "whatever Jarred feels like should be in there"

          This is the main draw. Everything he implemented was fast and minimalist and he usually implements a standardized api (web apis, esbuild bundler api).

          The opinionated stuff is usually very common sense.

          Most of the libraries OC mentions are things you would just like to be as fast as possible above all else.

      • evilrabbit99 1 hour ago
        wasn't that complaint mostly about those tiny dependencies like `is-even` or `is-array`?

        I feel like nobody complained that you needed to install a dependency to do headless browser testing for example.

    • panzi 20 minutes ago
      Out of the things you mentioned I think the following make totally sense to be included in a language runtime like this:

      JavaScript runtime (obviously), package manager, test runner for unit tests, bundler, JSX, SQLite bindings, formatter, linter, YAML and TOML parsers. Maaaaybe even a Markdown parser and HTML5 parser. Definitely JSON, CSV and XML parsers.

      I.e. similar to Python. Though Python is a bit of an incoherent mess. If you have all these you need them to be coherent.

    • ryankuykendall 20 minutes ago
      “ Why would I want everything reimplemented in this massive binary? “

      This isn’t about what individual developers would want but what is most beneficial to Anthropic and claude code. They are likely using Bun as a vehicle for standardizing and enriching local user environments in order to address common tasks that claude generally writes bespoke scripts to accomplish.

    • tempaccount420 1 hour ago
      It's faster to have it in the runtime in native code.

      You have more options, not less, you can still use the external dependencies.

    • Aurornis 1 hour ago
      > It's weird their promotional video repeats "you can do <million things> without installing dependencies",

      A couple years ago a common complaint was that the JavaScript ecosystem relied too heavily on dependencies for everything. Remember the left-pad incident where the developer deleted the popular dependency out of protest for reasons I can even remember? Or when colors.js was sabotaged to break everything that depended on it? The node-ipc package was sabotaged to delete files on developer’s machines. Then we had a wave of supply chain attacks that tried to insert malware into build scripts of popular dependencies.

      So the ecosystem started moving toward more batteries-included style development in response.

      • skydhash 1 hour ago
        The complaint was micro-dependencies and huge sprawling trees. What was needed was quality dependencies on the level of SDL, ffmpeg, libcurl, where one domain is solved well and the focus is on API stability and good implementation. Not a battery included type of things.
    • maherbeg 1 hour ago
      Some of these feel like solved problems effectively, so having them in the standard library is nice (at the expense of keeping these forever for backwards compatibility once a new tech replaces it). I do think having a larger standard library for common things (like golang) is the way to go. If a dependency seems to basically be installed by default everywhere, maybe it should go in the standard library.
    • bcye 55 minutes ago
      I always thought Bun's approach was to be the JS runtime with a large well-designed std-library, this isn't really new. It's nice to have a choice of a more or less-featured runtime depending on the project's requirements -- if size and complexity are an issue, there's a variety to choose from.
    • cnqso 1 hour ago
      I personally do not feel limited by the ~100mb binary size. We're working in Javascript after all.
    • ralusek 14 minutes ago
      Things like headless browsers are really annoying to include in FaaS environments, but are super useful. If they're in the runtime binary already, that'd be great.
    • pettijohn 41 minutes ago
      I for one prefer batteries-included. Decision fatigue for every cobbled together package takes its toll. Having a single, trustworthy, good-enough solution for so many things makes my life easier.
    • shimman 1 hour ago
      I've still yet to run into any enterprise project using bun in the wild. It really feels like something entirely contained within startups that would choose wildly inappropriate tech like next.js.

      Add in the influencer dev brainrot culture and you get these VC backed efforts to privatized publicly important projects (node.js) under control of quite evil people that have zero record of helping others.

  • mpeg 1 hour ago
    Announcing that the SSR memory leak is gone as part of a product launch is wild.
  • yomismoaqui 1 hour ago
    I like how the "over 10 MB smaller" is dubbed, sure the video was recorded some time ago and that number changed.

    https://youtu.be/i38DgEuaJwM?si=6oKAysKoRDPCihsL&t=176

  • sunsetSamurai 1 hour ago
    I recently pivoted to Rust for the backend development, after getting tired of the nodejs ecosystem fragmentation and how fragile things feel. Bun seems very interesting since it allows you to do so many things without pulling in 3rd party libraries and bundlers? Is anybody using it instead of nodejs? how's the experience so far? I might have to give it a try.

    Yes, I know there's probably better options than Rust for building APIs, but I wanted to learn it, so why not?

    • jjice 21 minutes ago
      The most appealing thing of Go to me is the good batteries including tooling. I don't use it much outside of little personal projects where I really don't want to deal with dependencies and want a small binary.
    • christophilus 33 minutes ago
      I'm using it, though I'm leery of how the project is run. It's been great, to be honest. I have been able to build very low-dependency projects quite quickly. Bun's documentation is decent, and its underlying features are performant.
    • m00dy 1 hour ago
      I always use Rust. You've made the right choice.
  • rwz 1 hour ago
    This is a huge win for Bun & Anthropic. I've been keeping an eye on Bun development cycle since they announced the Rust rewrite and the huge drama and backlash it generated. They seem to be proving the skeptics wrong with this release.
  • asT125 38 minutes ago
    So this is kind of a systemd for web developers. All functionality is absorbed into a vibe coded, un-auditable black box.

    Maybe run it as process 1 in a future ClaudeOS.

  • luciana1u 1 hour ago
    every couple years someone rewrites the whole toolchain and we collectively agree the last one was the mistake. good to know the cycle still works.
  • slowpoke-tail 31 minutes ago
    For me, notably absent from the release changelog and accompanying YouTube video they were excited to trumpet in the blog back in July, and the claim (still) this took 11 days. It's August 20th.
  • mawadev 32 minutes ago
    Why do these people look and talk so stiff in the video?
    • rs_rs_rs_rs_rs 6 minutes ago
      It's hard making videos.

      How about you make a video on something you published and see how you look?

      • mawadev 1 minute ago
        Do you believe what you say or are you unaware?
    • mpalmer 14 minutes ago
      Was the idea to put a human face on the automated refactor? Can't say it's especially effective
  • mjmas 1 hour ago
    This blog post / changelog is extremely long. Around 50 metres long on mobile.
    • neuronexmachina 1 hour ago
      It's pretty long, but looking through it the text seems pretty streamlined. I think there's just a lot of changes.
    • evolve2k 1 hour ago
      They recently used AI to rewrite the whole app in rust. Expect the slop fest to continue for some time yet.

      A year from now folks will be; I can’t use it anymore it’s too unreliable but for now keep looking the other way.

  • tumdum_ 1 hour ago
    I wonder what was total token cost of the rewrite.
    • meetpateltech 35 minutes ago
      From the Rewriting Bun in Rust blog post: 5.9B uncached input tokens, 690M output tokens, 72B cached reads, came out to ~$165k at API pricing.
      • tumdum_ 31 minutes ago
        That was the initial work, but since then there was lots of work performed with LLMs.
    • sroussey 39 minutes ago
      I think around $300-400k, but that does not include the github issue/pr/ci stuff that runs continuously, which could double or triple it. Somewhere, the first two weeks were said to be about $200k.
  • ar_lan 42 minutes ago
    Am I the only one starting to get annoyed by Bun just due to all the surrounding drama? I was genuinely surprised this was an actual link about an update - my gut inclination opening that was Jarred probably decided to rewrite Bun to JavaScript to stay pure or something like that.
  • rs_rs_rs_rs_rs 35 minutes ago
    I am in awe at how good the llm rewrite to rust is, not a single issue when running claude code for months now.
  • andsoitis 1 hour ago
    Congratulations to the Bun team!
  • classicposter 1 hour ago
    https://bsky.app/profile/jacob.gold/post/3msvjwys7lc2t

    Hey, did the memory leak really solve with slop rewrite?

  • timetraveller26 1 hour ago
    I, for one, don't welcome our new AI overlords
  • curiousmindz 46 minutes ago
    [flagged]
  • preommr 1 hour ago
    omfg, that's a long post.

    How is this even possible?

    I know we're all using AI, but Bun seems like the one singular project where there's just been a crazy increase in the amount of output, a 10x on the 10x.

    How are they doing this?

  • suriyaG 1 hour ago
    This is awesome.

    slightly aside, but I find it worrying that our industry treats a lot of cannon events in stride and don't organize around that idea or to mitigate the risks around that idea.

    things that everybody basically just complained but ended up working out fine,

    - Bun rust rewrite. - Elon Musk firing 80% of twitter by stack ranking employees by code committed - autocompletion basically just taking over everyone

    maybe I'm just taking extremely outlier outcomes. but it is still fascinating to see people complain about how LLMs don't think

    • mpalmer 11 minutes ago
      How are you deciding that either of these things worked out fine
  • reducesuffering 22 minutes ago
    Absolute crickets from the "there's no way LLM's can rewrite Bun to Rust this quickly, it's going to be buggy, it's marketing" crowd

    Comments here 3 months ago are quite something: https://news.ycombinator.com/item?id=48132488

  • ksec 1 hour ago
    While it has been used by Anthropic, the main question is if it works in other Bun's 1.3 production settings. Ignoring all the improvements, if it does work and no major bug or problems occurred, We are in for some management top down "Rewrite it in Rust" action over the next few years. And perhaps even worst, management will believe in Claude feed into Claude development.

    This isn't so much about Bun or Node.js any more. It is the battleground for AI and non-AI coding.

    • aurareturn 43 minutes ago

        This isn't so much about Bun or Node.js any more. It is the battleground for AI and non-AI coding.
      
      There is no non-AI coding anymore. I guarantee you Node.js team is heavily using AI to make changes and debug.
  • julenx 1 hour ago
    From the release video, something catching my attention:

    > In Bun 1.4, I rewrote Bun in Rust. [...] I did it in 11 days, using Claude Code, and wrote about how, in our blog.

    Everything else in the video is phrased as "we", and even the section in the blog post is "We rewrote Bun in Rust"[1].

    There's no question Jarred did the work and deserves enormous credit for it. I just found the contrast interesting, because the video explicitly frames the rewrite as "I", whereas the rest of the release frames it as "we".

    [1] https://bun.com/blog/bun-v1.4#we-rewrote-bun-in-rust

    • seabass 56 minutes ago
      I think this was to contrast with the multi-engineer effort the task would normally be.