simonw 17 hours ago

Because they needed something that could produce a single binary that works on every platform. They started shipping Claude Code with Bun back in July: https://x.com/jarredsumner/status/1943492457506697482

  • LunaSea 17 hours ago
    • zstscrs 15 hours ago

      Every time I see people mention things like this in node vs bun or deno conversations I wonder if they even tried them.

      >The single executable application feature currently only supports running a single embedded script using the CommonJS module system.

      >Users can include assets by adding a key-path dictionary to the configuration as the assets field. At build time, Node.js would read the assets from the specified paths and bundle them into the preparation blob. In the generated executable, users can retrieve the assets using the sea.getAsset() and sea.getAssetAsBlob() APIs.

      Meanwhile, here's all I need to do to get an exe out of my project right now with, assets and all:

      > bun build ./bin/start.ts --compile --outfile dist/myprogram.exe

      > [32ms] bundle 60 modules

      > [439ms] compile dist/myprogram.exe

      it detects my dynamic imports of jsons assets (language files, default configuration) and bundles them accordingly in the executable. I don't need a separate file to declare assets, declare imports, or do anything other than just run this command line. I don't need to look at the various bundlers and find one that works fine with my CLI tool and converts its ESM/TypeScript to CJS, Bun just knows what to do.

      Node is death through thousand cuts compared to the various experiences offered by Bun.

      Node adds quite the startup latency over Bun too and is just not too pleasant for making CLI scripts.

      • heldrida 13 hours ago

        I agree, they seem to have never tried it at all! Bun DX is the best, and Bun is the trend setter. Others are just catching up!

    • simonw 17 hours ago

      They evidently evaluated Node.js in comparison to Bun (and Deno) earlier this year and came to a technical decision about which one worked best for their product.

      • dvtkrlbs 16 hours ago

        I highly doubt that the JS ecosystem is driven mostly by hype so I highly doubt the nodejs solution even put on a table in an internal issue tracker.

        • simonw 16 hours ago

          Claude Code shipped on top of Node.js for the first four months of its existence.

          Why wouldn't they consider their options for bundling that version into a single binary using Node.js tooling before adopting Bun?

jitl 17 hours ago

it starts fast and does better job than nodejs for their product

stonogo 18 hours ago

Because Microsoft already owns that.

  • Octoth0rpe 18 hours ago

    Are you referring to node? MS doesn't own that. It's maintained by Joyent, who in turn is owned by Samsung.

    • simonw 17 hours ago

      Joyent handed Node.js over to a foundation in 2015, and that foundation merged into the JS Foundation to become the OpenJS Foundation in 2019.

      I'm not sure if Joyent have any significant role in Node.js maintenance any more.

      • Octoth0rpe 17 hours ago

        Oops, thank you :)

        regardless, it's certainly not MS.

        • stonogo 11 hours ago

          Microsoft owns npm outright and controls every aspect of the infrastructure that node.js relies on. It also sits on the board (and is one of the few platinum members) of the Linux Foundation, which controls openjs. It is certainly MS.

  • [removed] 17 hours ago
    [deleted]