Remix.run Logo
simonw 4 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 4 hours ago | parent [-]

They could use the Node.js equivalent: https://nodejs.org/api/single-executable-applications.html#s...

zstscrs 2 hours ago | parent | next [-]

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 16 minutes ago | parent [-]

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 4 hours ago | parent | prev [-]

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 3 hours ago | parent [-]

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 3 hours ago | parent [-]

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?