April 3, 2026

Counting cores, counting clapbacks

Bun: cgroup-aware AvailableParallelism / HardwareConcurrency on Linux

Bun now counts container CPUs — and the comments are on fire

TLDR: Bun is updating how it counts CPUs so apps in Linux containers use only the cores they’re allowed, with a linked WebKit change needed to fully enable it. Commenters split between applauding the practical fix, memeing the “WTF” acronym, and roasting Bun’s “vibecoding,” turning a plumbing tweak into a culture clash.

Bun just rewired how it counts CPU cores on Linux so it can respect container limits instead of blindly using the host’s full power. In plain English: apps won’t overbook the kitchen when the container only has two burners. Devs noticed it also fixes a sneaky bug where a list of CPUs changed size mid-use, and there’s a big caveat: this relies on a linked WebKit change, so the magic only kicks in once that lands. Meanwhile, the docs vs. code mismatch (does the CPU list show host or container cores?) sparked side-eye.

But the real show is the comments. One poster shrugged and said the “more interesting commit” is actually this one, turning the thread into a what should we care about brawl. Another dropped a teachable moment: WTF isn’t a swear—it’s WebKit’s “Template Framework,” which instantly became a running joke. And then came a drive-by dunk: a commenter claimed Bun “went all in on vibecoding” and has “gone downhill,” igniting the eternal hype vs. substance war. Fans say respecting container limits is a huge performance and cost win; skeptics call it basic housekeeping dressed as heroics. Either way, it’s classic dev drama: a careful plumbing fix becomes a battlefield for vibes, acronyms, and priorities.

Key Points

  • Bun routes navigator.hardwareConcurrency, os.availableParallelism(), and bun.getThreadCount() through WTF::numberOfProcessorCores().
  • On Linux, CPU count will be computed as min(sysconf, sched_getaffinity, cgroup cpu.max) after a companion WebKit PR lands.
  • A previous os.cpus() array length mutation issue is fixed by using hostCpuCount from sysconf for sizing, ensuring consistency.
  • Changes affect Bun’s thread pool sizing and JSC GC/JIT worker counts, with direct performance implications if miscounted.
  • Cgroup-aware behavior depends on a WebKit change and vendoring update; documentation mentions about os.cpus().length may need clarification.

Hottest takes

“is the more interesting commit tbh” — saagarjha
“WTF is ‘WebKit Template Framework’” — elffjs
“gone down the shitter after they went all in on vibecoding” — phplovesong
Made with <3 by @siedrix and @shesho from CDMX. Powered by Forge&Hive.