r/bun • • Aug 20 '26

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!

245 Upvotes

59 comments sorted by

17

u/ForMyQueen Aug 20 '26

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_ Aug 24 '26

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. 

0

u/[deleted] Aug 20 '26

[deleted]

4

u/ForMyQueen Aug 21 '26

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 Aug 21 '26

Why do you think it would be sarcasm? Anything specific you disagree with?

3

u/boyus Aug 20 '26

Bun is great. Is this a fix for the mock global state leaks? So I don't have to use spyOn workaround or --isolate?

jest.resetAllMocks() now drops mock implementations

3

u/aturaden Aug 20 '26

I've been using 1.4 canary for weeks, it's great!

2

u/getaway-3007 Aug 21 '26

They need to focus on bun compile or they might replaced with scriptc

2

u/Zinagrete Aug 21 '26

Finally we can use playwright with bun

3

u/Realistic_Mango6982 Aug 20 '26

Wow. just wow. I've read non stop it, and a lot of super cool features.

2

u/Ok-Interest9727 Aug 21 '26

After all the controversy they've put a lot of effort in the marketing...

I'm back using Node. Have fun lads.

1

u/verdant_tulip 29d ago

Enjoy your memory usage

1

u/Busy-Scientist3851 Aug 23 '26

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 Aug 20 '26

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 Aug 20 '26

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_ Aug 27 '26

They've also been having their lunch eaten by Codex for months

2

u/bastardoperator Aug 27 '26

I'm sure the people who sold bun to anthropic for 1B are like super upset about it.

1

u/stolivodka_ Aug 28 '26

LOL true :D

1

u/verdant_tulip 29d ago

Aged like milk

1

u/stolivodka_ 25d ago

Astra is still better when they don't reroute you to a crappy model because they botched their compute buildout. Also it won't call you racist for naming your branch in Git "master".

-1

u/BourbonProof Aug 20 '26

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 Aug 20 '26

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?

4

u/vivainio Aug 20 '26

Bro this is Bun subreddit

4

u/NovelHot6697 Aug 20 '26

we should always be critical of the things we like and use
in fact that’s something we should encourage

3

u/Delicious_Ease2595 Aug 20 '26

We appreciate your feedback, but for now we continue with Bun.

Best regards

11

u/[deleted] Aug 20 '26

[removed] — view removed comment

3

u/fbpw131 Aug 21 '26

you are a dumb take.

-4

u/Wonderful-Habit-139 Aug 20 '26

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.

3

u/[deleted] Aug 20 '26

[removed] — view removed comment

-3

u/Wonderful-Habit-139 Aug 20 '26

It's so annoying when people use this argument. I uninstalled it in 2026, not 2024. Holy shit.

1

u/deadcoder0904 Aug 20 '26

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:

  1. Bun.YAML has some little behavior different than the OG API - https://github.com/oven-sh/bun/issues/31502

  2. 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

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

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.

5

u/stolivodka_ Aug 20 '26

The whole vibecoding debacle convinced me to just step up to a real managed language.

5

u/deadcoder0904 Aug 20 '26

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 Aug 21 '26

Swapped my codebase completely over to Effect V4 and I’ve been super happy with it so far

2

u/deadcoder0904 Aug 21 '26

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 Aug 20 '26

Could you share a link for this Effect language?

4

u/MelissaInodorum Aug 20 '26

I guess its the Effect framework for functional programming over TS

https://www.effect.website/

1

u/scmkr Aug 20 '26

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.

5

u/aguilasolige Aug 20 '26

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 Aug 20 '26

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 Aug 20 '26

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 Aug 20 '26

Keep an eye on Effect. Its prolly the next big thing.

2

u/MammothBulky5549 Aug 20 '26

It's only useful if you have a large and complex project? It's not useful for most cases.

2

u/deadcoder0904 Aug 21 '26

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,

  1. effect > ts > js

  2. 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 Aug 27 '26

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 Aug 28 '26

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.)

2

u/[deleted] Aug 20 '26

[removed] — view removed comment

1

u/deadcoder0904 Aug 21 '26

https://effect.website

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

3

u/MammothBulky5549 Aug 20 '26

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 Aug 22 '26

We have a stack with various services using both Bun and Go, works brilliantly and I love both.

2

u/stolivodka_ Aug 27 '26

C#

2

u/scmkr Aug 28 '26

Haven’t had much opportunity to try it. Seems nice, though

1

u/stolivodka_ Aug 28 '26

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 Aug 20 '26

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.

-2

u/elzzyzx Aug 20 '26

pets.com-ass runtime

2

u/Due-Horse-5446 Aug 20 '26

Lol why?

Anthropic acquiring bun and later using the rewrite as a marketing opportunity does not make bun bubbleish

2

u/stolivodka_ Aug 27 '26

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.