I've written about Bun before. Here's the gist of my review from early 2024: > I like it, and am pretty much sold. The main caveat as I see it, currently, is that there are certain oddities in both the package manager and the runtime. I also wrote about Bun in [[Faster unit tests with Bun]] and [[The Hero JS Needs]]. So, time for an update. > [!hint] Bun has only gotten better I put down my IC hat a number of months ago and have only been writing code occasionally on the side recently, which is one area where Bun really shines. ## **No more tooling** It's so refreshing to simply `bun run something.ts` than having to workaround oddities in either `ts-node` or `tsx`. Why not just use JavaScript? I find TypeScript is objectively more useful since its an incrementally typed language. I wrote about this in [[TypeScript with implicit any is a great dynamic language]]. Tooling in the JS and TS ecosystem is a dumpster fire, perhaps rivaled only by tooling in the Python ecosystem. I cannot overstate how energizing it is to be able to completely forget about it, and also be able to not have to rely on AI to perform the incantations for you. Write a `.ts` file, run teh file directly, just like that. ## Better Node.js Compatibility This is the killer feature of bun and what really enables typescript as a first-class language. All the Node.js APIs your probably familiar with just work, which means all your random dependencies also just work. It's been a while since I've had a compat issue. The last one was the node version of gRPC not working under Bun, however that's since been fixed. All of my projects that i've touched in the past 6 months have been converted to use bun as the package manager, and most of the scripts i've written since then use TS as the language and Bun as the runtime. It's great. ### AI understands Node I'd like to also point out something important: AI is pretty good at writing Node.js code, which means strong Node.js compability allows Bun to easily run AI-written code. This is important if, like me, you do your coding on the side and generally don't want to spend much time on it. Have the AI write the script, run it, it works, enjoy. You will have to tell your AI not to worry about TypeScript tooling though, otherwise it will being in silly dependencies like `ts-node`, gross. ## The test of time Not enough time has passed to really be able to put Bun through its paces as a package manager and a runtime. For example, I have projects that were initially written on an Intel Mac many, many years ago. NPM and yarn both have a very bad time with these projects and have at times required my human effort to get the projects working again. I do not think Bun would be able to paper-over something as significant as a shift in CPU architecture, but perhaps it would have done a better job with old projects than NPM or yarn. Time will tell. ## The profitability specter The biggest downside of Bun is that it's a company, and a VC backed company nonetheless! That's not good for longevity. The excellent node.js compatability means there's very little lock-in if you build a project using Bun and later decide to switch to Node as a much more battle-tested runtime. So how exactly will Bun both remain awesome and return a tidy profit to investors? Who knows. Last I heard they were going to offer some form of hosting, but web app hosting is a very competitive market. The best outcome may be some acquisition by one of the major players that doesn't need it to be profitable. If, for example, Microsoft bought Bun and kept it going as a formally-blessed runtime for TypeScript then Bun might have a bright future indeed. It's become so useful that I very much hope it doesn't disappear or become merely lead-gen for some other platform. --- So, has Bun won? Well, clearly not yet in terms of adoption. However, as I said it's so useful that I suspect it's only a matter of time before developer mindshare realizes that there's no longer a need to spend any time worrying about TypeScript tooling. Bun has won me over for now, maybe the ecosystem at large will come around in 2025. Or maybe some other player will solve the same problems in a different way.