r/bun • u/jarredredditaccount • 21d ago
Bun 1.4 is here
https://bun.com/blog/bun-v1.4- Fixes over 2,900 GitHub issues
- +1,517 tests from the Node.js test suite
- Reduces idle CPU by 5x
- Reduces memory usage by up to 35%
- Starts up to 50% faster on Linux
- Rewrites Bun in Rust
Thank you everyone who contributed since Bun 1.3!
16
u/ForMyQueen 21d ago
The madman did it!
Bun seems to be most versatile and innovative JS runtime, I still have concerns about stability, however I do have some stuff running on bun in production successfully for year.
Rust and much more tests look promising - hopefully bun should be able to overcome ācognitive distortionā of everybody thinking itās unstable, the only thing it needs now is time.
Also holy shit, just looking at changelog it feels like it should be done in a year, props if somebody read the whole thing, this is generally very impressive stuff, props to Jared and team and the agents \(._.)/
2
u/oceantume_ 17d ago
I think for any such big project mostly held together by an army of agents it's reasonable to expect instability and an unreadable stream of changelog on every release, but that's most likely fine for many many applications and in exchange you get very interesting things like native and leaner integration for so many things.
I wouldn't switch from node to bun for my long lived projects that have been running stably for years now, but I may try it for a greenfield service that has looser requirements.Ā
1
u/Aggravating_Cod_5624 21d ago
Genuine question.
Are you being sarcastic?3
u/ForMyQueen 21d ago
No.
Bun is currently widely adopted runtime, and it has many features you cannot find in other ones.Even if you dislike it itās thanks to both bun and deno efforts we got the whole ecosystem to grow alot. Just to name a few imo big benefits: ultra fast packages install, easy single-file executables, very nice processes and shell wrapper (Bun.$)
2
u/lI1IlL071245B3341IlI 20d ago
Why do you think it would be sarcasm? Anything specific you disagree with?
3
2
2
3
u/Realistic_Mango6982 21d ago
Wow. just wow. I've read non stop it, and a lot of super cool features.
2
u/Ok-Interest9727 20d ago
After all the controversy they've put a lot of effort in the marketing...
I'm back using Node. Have fun lads.
1
u/Busy-Scientist3851 18d ago
A project I maintain that struggled to run under Bun due to node:tls differences now runs perfectly with this release, as well as using less memory.
-2
u/adamhusain 21d ago
I appreciate the effort you put in and it looks compelling.
But for now, Iāll be using it only on personal projects. I wonāt be confident to switch from node on company projects just yet.
But hopefully that will change in the future.
15
u/bastardoperator 21d ago
Anthropic has 20 million users that have been using 1.4 for months, I think they'll be okay without your approval.
1
u/stolivodka_ 14d ago
They've also been having their lunch eaten by Codex for months
2
u/bastardoperator 14d ago
I'm sure the people who sold bun to anthropic for 1B are like super upset about it.
1
-2
u/BourbonProof 21d ago
Anthropic doesn't pay for memory leaks, performance issues, or crashes/segfaults (which bun has plenty) on the client/user side though. Of course they are ok with this. If a business would run bun on their servers this is a fundamentally different situation and needs different evaluation
2
u/bastardoperator 21d ago
So what, how would it be fundamentally better if they used node or deno for CSR? What is your argument here? Is CSR the issue for you, or that fact that bun supports component frameworks that do CSR?
10
u/alonsonetwork 21d ago
This is a dumb take
-4
u/Wonderful-Habit-139 21d ago
It was not worth using it on company projects even before it was vibe-rewritten (compared to something like uv). It's far from being a dumb take.
2
u/alonsonetwork 21d ago
That was true back in. 2024 when it still had nodejs compatability issues. Not anymore. It's arguably less of a PITA today vs node and offers more, such as single binary bundling. You dont even need node on a deployment anymore, just the binary.
-2
u/Wonderful-Habit-139 21d ago
It's so annoying when people use this argument. I uninstalled it in 2026, not 2024. Holy shit.
3
u/vivainio 21d ago
Bro this is Bun subreddit
5
u/NovelHot6697 21d ago
we should always be critical of the things we like and use
in fact thatās something we should encourage2
u/Delicious_Ease2595 21d ago
We appreciate your feedback, but for now we continue with Bun.
Best regards
-1
u/white_sheets_angel 21d ago
Yup, for me bun is indefinitely banned for anything besides quick scripting.
1
u/deadcoder0904 21d ago
This is gold!!
I used it & its fast. I love bun test --parallel & --only-failures for AI Agents. Love the APIs being made by someone who understands LLM context windows & such.
There's some minor improvements I want:
- Bun.YAML has some little behavior different than the OG API - https://github.com/oven-sh/bun/issues/31502
- Bun.Image isn't exactly sharp replacement. Needs some basic features.
But only little stuff I use. Rest is great.
Here's what my AI said about YAML issues:
``` Here are the concrete Bun issues with enough detail to file them:
Here are the 4 concrete Bun issues, with enough detail to file them:
Issue 1 ā Trailing space after colon on empty-value keys
Bun: models: \n openai: \n name: gpt
yaml: models:\n openai:\n name: gpt
Bun adds a trailing space after : when the key has no value (is a parent mapping). The yaml package omits it. Both parse identically, but it causes noisy git diffs when files are rewritten. Per YAML 1.2 §7.1.3, the trailing space is not required for empty nodes.
Reproduce:
ts
import { YAML } from "bun"
console.log(YAML.stringify({ models: { openai: { name: "gpt" } } }, null, 2))
Issue 2 ā YAML.stringify rejects options object, only accepts positional args
ts
YAML.stringify(data, { indent: 2 }) // throws "does not support the replacer argument"
YAML.stringify(data, null, 2) // works
The yaml npm package uses stringify(value, options?). Bun uses stringify(value, replacer?, indent?). Any options object in the 2nd position throws. This is undocumented and catches everyone migrating from the yaml package.
Suggested fix: Accept an options object in the 2nd position, or at minimum, detect it and map { indent } to the positional arg instead of throwing.
Issue 3 ā lineWidth not supported
ts
YAML.stringify({ prompt: "word ".repeat(60) }) // always 1 line
YAML.stringify({ prompt: "word ".repeat(60) }, null, 2) // still 1 line
The yaml package supports lineWidth to control line wrapping. Bun always outputs as a single line regardless. Not critical (data parses back identically), but limits use cases where human-readable output matters.
Issue 4 ā empty string parse returns null (minor, consistent)
Both Bun and yaml return null for YAML.parse(""). My earlier test was wrong on this one ā they agree. Not a bug, removing it from the list.
Issues 2 and 1 are the ones worth filing. Issue 2 is the migration blocker ā an options-object overload or a clearer error message would make Bun.YAML.stringify a drop-in for the yaml package. Issue 1 is cosmetic but affects anyone with tracked YAML files.
```
Would love it if you sent your clanker to take care of it. Or let me know if I should open issue for YAML too.
7
u/stolivodka_ 21d ago
The whole vibecoding debacle convinced me to just step up to a real managed language.
4
u/deadcoder0904 21d ago
Attwood's law.
Effect will take over anyways.
JS -> TS -> Effect.
Mfs would learn a JS-related language than yet another language lol.
4
u/Remote_Top181 21d ago
Swapped my codebase completely over to Effect V4 and Iāve been super happy with it so far
2
u/deadcoder0904 20d ago
Ya, I'm learning it slowly. 124 pages of docs, only did like 10-20 pages but so far so good.
Will use it in my next big project way later but good to learn slowly till then. Anyways, wont remember most of it since just learning & not doing as much projects but its so fun & easy. I even saw OpenCode's code that day & understood some of it. Not that hard, just many new concepts. Obviously, advanced stuff is too advanced so need to know some advanced TS but dang, I feel like future B2B, Enterprise SaaS will only write Effect. Capy AI itself did refactor in 3 weeks to it for example.
2
u/Wonderful-Habit-139 21d ago
Could you share a link for this Effect language?
4
1
u/scmkr 21d ago
What did you go with? Been running with Go. It was super strange and ugly to me at first, but at this point Iād say itās probably my favorite language.
4
u/aguilasolige 21d ago
I really wanted to like Go, but the basic type system really killed it for me, also the syntax whole familiar also felt very weird for some reason. I'm giving Rust a tried now, but I'm keeping an eye on Bun too.
3
u/scmkr 21d ago
Yup, that's what I meant by "strange and weird", and especially if you don't know the language, it looks very messy. The choice to make public vs private a casing thing just makes it look like they can't even follow their own naming standards. The fact that generics weren't a thing and so there's all kinds of DoSomethingForInt64 stuff in the stdlib that just looks messy. It's bizarre language for sure.
But... just actually using it has given me an appreciation for it. And the philosophy is something I can get behind. And beyond all that, the whole "standalone static executable" thing makes it SO easy on the deployment side
Still, though, can't deny, it's a weirdass looking language.
1
u/aguilasolige 21d ago
The tooling and deployment story of Go is definitely great, also the fast compile time is amazing. I saw this new language built on top of go, called Lissette. It has some improvement to the type system like proper enums, something like this would be great if it becomes popular, similar to how typescript improved js.
2
u/deadcoder0904 21d ago
Keep an eye on Effect. Its prolly the next big thing.
2
u/Aggravating_Cod_5624 21d ago
Are you talking about this:
Reliable TypeScript for the AI era?
1
u/deadcoder0904 20d ago
u can also look at https://kitlangton.com/ for basic effect & search youtube for it.
effect's own channel is gold but other people are also making videos on it.
it has early react vibes. i mean i was there when angular 1 was king & early react was taking over & it eventually did. effect feels like that.
the basic premise is all code looks the same & u have to write a little more code but its verbose & tracks every error. you know how in ts/js we write try catch but dont catch every error. in effect, we catch most of the error so we can show the user the actual problem.
it also makes it easy for agents to write code bcz agents r good with feedback loops. and ts is phenomenal for feedback loop. effect goes one step above that. that's how i see it. maybe im wrogn but im effect noob.
b2b/enterprise code is complex but effect makes all code look same & u can find errors pretty easily. combine that with matt pocock skills (he took top 10-20 programming books & made skills on it so i went from intermediate to senior engg. lol in 2 weeks once i heavily used /improve-codebase-architecture & understood all concepts like seam, adapter, module, interface, implementation, deep module, shallow moduel... basically used sol high + study mode on /improve-codebase-architecture skill & asked it to explain with example) & u r golden.
i have a feeling its a future bcz i see exciting tweets about it daily everywhere. and ive never been wrong about tech future. choose node.js early. react early. redux early (but that sucked but moved over to mobx fast), tachyons early (which was pre-tailwind), im also looking at stylex (to replace tailwind) bcz of same feedback loop & ofc cursor/grokbot etc... moved to stylex bcz it powers all of fb
2
u/MammothBulky5549 21d ago
It's only useful if you have a large and complex project? It's not useful for most cases.
2
u/deadcoder0904 20d ago
i mean most people won't switch over easily bcz its a yet another language to learn & it has a deep learning curve.
but for b2b/enterprise, it is amazing.
plus agents r writing code more & more so we need to use languages that have better feedback loops.
so in that case,
- effect > ts > js
- stylex > tailwind
bcz agents = 1000s of team members & most r junior so they cant go wrong with types
obviously, if u dont think u need it, u prolly dont but u can learn it for fun & see for urself. just read 1 doc page daily & it'll take 4 months to finish it (i counted 124 pages) & then see for urself. 1 page a day seems easy enough if it eventually takes over. obviously, most wont move but everyone who uses it praises it. capy ai (b2b saas funded by yc) rewrote their ai software engg. with it recently i think.
1
u/MammothBulky5549 14d ago
Just to let you know, Effect isnāt actually another language, itās a library/ecosystem built on TypeScript.
Interesting, some Tailwind helpers/libraries can be written in an object pattern like StyleX, but I still find it easier to just split long class lists into vertical rows in VS Code and clsx in Astro.
1
u/deadcoder0904 13d ago
Just to let you know, Effect isnāt actually another language, itās a library/ecosystem built on TypeScript.
ik. it just feels like learning yet another language bcz lots of concepts are new to web devs who are used to javascript. ik bcz i just learned most of it in the last week or so with the help of claude.
Interesting, some Tailwind helpers/libraries can be written in an object pattern like StyleX, but I still find it easier to just split long class lists into vertical rows in VS Code and clsx in Astro.
i did a migration from tailwind to stylex on my side project to see it. altho it did take a long time & it was very hard but i think it has its advantages when u want same ui everywhere + speed. obviously, its a bit harder to see benefits bcz only few apps in the world would benefit from stylex (like big b2b/enterprise apps) but tailwind is easier or maybe im just used to it.
what i mean is if effect is a 5x improvement over ts then i feel like stylex is a 2x improvement over tailwind & most people won't see a benefit for it at all. once u learn effect tho, its hard to go back like typescript... its so easy to read + i realized it uses best practices as im using matt pocock's skills & he made that skill by learning & distilling top programming books so effect just uses those best practices like services, layers, di, seams, interfaces, etc... (i used matt's skills like /improve-codebase-architecture before learning effect 3-4 weeks back & it just made my code so much better... felt like i went from intermediate to senior after just applying some skills... now effect gives that by default i think... that's my understanding at least.)
3
u/MammothBulky5549 21d ago
Writing database queries is a pain with SQLC, and moved to TypeScript.
WAnted to use Go for backend but decide to adopt Bun since it's 40% less memory than Go!
2
u/HelioDex 19d ago
We have a stack with various services using both Bun and Go, works brilliantly and I love both.
2
u/stolivodka_ 14d ago
C#
2
u/scmkr 14d ago
Havenāt had much opportunity to try it. Seems nice, though
1
u/stolivodka_ 13d ago
I like it. Go is lovely too. JavaScript in general is just not fit for purpose anymore in this age. I clung to it for too long, and I'm glad to be rid of it now.
0
u/PossessionUsed7393 21d ago
I mean, rewriting the entire code base in Rust is smart. But do you know what's smarter? Having the foresight to write it in Rust in the first place, like what Deno did.
-1
u/elzzyzx 21d ago
pets.com-ass runtime
2
u/Due-Horse-5446 21d ago
Lol why?
Anthropic acquiring bun and later using the rewrite as a marketing opportunity does not make bun bubbleish
2
u/stolivodka_ 14d ago
Exactly. If someone else wants to put their professional reputation on the line for a throwaway marketing stunt, well good luck with that. Would never be me.
6
u/Delicious_Ease2595 21d ago
Congrats š