Bun (@bunjavascript) header
Bun (@bunjavascript) profile picture

Bun is a fast, all-in-one toolkit for installing, bundling, running and testing JavaScript & TypeScript. To install: `npm i -g bun`

Joined July 2022
Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)Photo by Bun (@bunjavascript)
In the next version of Bun, async functions compile to smaller bytecode. JavaScriptCore used to save and restore each local variable separately around every await. Now it takes one instruction to save them all and one to restore them.
5
11
1
245
8,684
In the next version of Bun Compression gets faster. Brotli at level 11: 32x faster gzip: 5.7x faster zstd: 2.3x faster
41
25
2
997
38,146
In the next version of Bun Decompression gets faster. gzip: 3.3x zstd: 2.4x brotli: 2.3x
19
9
1
391
16,247
pt. 2 puppeteer → bun vite → bun express → bun ws → bun bcrypt → bun node-cron → bun node-pty → bun marked → bun js-yaml → bun fast-glob → bun execa → bun tar → bun pkg → bun tsup → bun diff → bun
eslint → bun prettier → bun tsc → bun jest / vitest → bun esbuild → bun pnpm → bun tsx / ts-node → bun nodemon → bun ioredis → bun pg → bun mysql2 → bun better-sqlite3 → bun aws-sdk/client-s3 → bun sharp → bun dotenv → bun
17
8
6
284
17,463
eslint → bun prettier → bun tsc → bun jest / vitest → bun esbuild → bun pnpm → bun tsx / ts-node → bun nodemon → bun ioredis → bun pg → bun mysql2 → bun better-sqlite3 → bun aws-sdk/client-s3 → bun sharp → bun dotenv → bun
119
76
39
1,437
111,979
In the next version of Bun `Bun.diff` diffs text & arrays, and creates, parses & applies patches
27
11
6
464
19,779
Our full CI pipeline is now sub 1 min. Here is what I did: - Vitest -> bun test - tsc -> bun check - oxlint -> bun lint - oxfmt -> bun fmt - shards filled by recorded test time - PRs run only the tests the diff can reach - backend builds the app once per process - lint, typecheck, build and tests all in parallel 200+ hours of waiting saved every week
145
77
30
3,001
333,606
Replying to @bunjavascript
@bunjavascript Yeah so your new linters are fucking insane. Thanks for the free performance LMAO
4
3
126
8,810
The @bunjavascript team implemented both import defer and using in JavaScriptCore, and they've shipped in Safari 27.3 Beta! 🎉 developer.apple.com/document…
27
301
14,440
Bun AoT in an Express node:sqlite REST API 40% less memory 14% lower cpu No JIT warmup
35
16
3
682
31,963
We upgraded our Bun runtime to Bun 1.4 and took Node.js out of the image entirely. Memory per container dropped 41%, cold starts are 18% faster and the image is 25% smaller. @jarredsumner and the @bunjavascript team are still cooking. tgr.dev/uv7Lfki
6
8
180
10,772
$ 𝚊𝚕𝚒𝚊𝚜 𝚗𝚘𝚠=𝚟𝚎𝚛𝚌𝚎𝚕 $ 𝚌𝚊𝚝 >𝙳𝚘𝚌𝚔𝚎𝚛𝚏𝚒𝚕𝚎 <<'𝙴𝙾𝙵' 𝙵𝚁𝙾𝙼 𝚘𝚟𝚎𝚗/𝚋𝚞𝚗:𝚊𝚕𝚙𝚒𝚗𝚎 𝙲𝙼𝙳 ["𝚋𝚞𝚗","-𝚎","𝙱𝚞𝚗.𝚜𝚎𝚛𝚟𝚎({𝚙𝚘𝚛𝚝:𝟾𝟶,𝚏𝚎𝚝𝚌𝚑:()=>𝚗𝚎𝚠 𝚁𝚎𝚜𝚙𝚘𝚗𝚜𝚎('𝚠𝚎 𝚊𝚛𝚎 𝚜𝚘 𝚋𝚊𝚌𝚔')})"] 𝙴𝙾𝙵 $ 𝚗𝚘𝚠 > Ready: bun-dockerfile.vercel.app
Your plain 𝙳𝚘𝚌𝚔𝚎𝚛𝚏𝚒𝚕𝚎 now deploys on Vercel. Add a 𝙳𝚘𝚌𝚔𝚎𝚛𝚏𝚒𝚕𝚎 or 𝙲𝚘𝚗𝚝𝚊𝚒𝚗𝚎𝚛𝚏𝚒𝚕𝚎 at your root, then Vercel selects the Container preset, builds it, and routes traffic to the image. vercel.com/changelog/deploy-…
56
12
4
363
41,709
I spent some time on the weekend to test bun's AOT compiler and results are nothing short of amazing. Performance up 2-3x, memory use less than half.
Bun AOT also introduces `--trim` which deletes unused parts of Bun from the compiled binary On macOS, a binary that uses Bun.serve’s HTTP server goes from 89 MB to 25 MB
73
24
3
896
74,664
Merging Bun AOT next week, then testing on Claude Code Expecting 2-3x less memory + CPU & a slightly smaller binary This is the future of server-side JavaScript Instead of you rewriting in Rust, we rewrote JavaScript's compiler to emit native code ahead of time
4th attempt at Bun AOT. Code quality & design is better. Perf is nearly there. Most importantly though It’s just TypeScript. Disregard everything I said last week about `as` casts changing runtime behavior and function arguments throwing. None of that is necessary.
115
59
29
1,612
108,941
Bun's now leading the TypeScript checker race! As always, in @framer's monorepo: 🏆 bun check: 2.42s, 2.0 GB | v1.4.4 🥈 tsrs: 2.50s, 2.6 GB | v0.18 🥉 tsc-ts: 5.9s, 5.3 GB | v0.6 TS 7.1 beta: 13.9s, 8.1 GB
Bun v1.4.4 - Fixes 271 issues, addressing 544 👍 - `bun fmt` is a fast Prettier-compatible code formatter - `bun check` gets 1.4x - 7.8x faster - New in Bun.SQL & WebSocket - Security fixes, including for Brotli, TLS certs, HTTP/3, and more bun.com/blog/bun-v1.4.4
7
12
7
288
23,015
In the next version of Bun bun check gets 1.7x - 7x faster
62
27
9
1,251
53,626
Bun retweeted
Moved an important API from Node → @bunjavascript Latency p50: −25% p95: −60% p99: −80% Resources Memory: −63% CPU: −25%
7
4
3
170
19,220
An early preview of experimental Bun + JSC with ahead-of-time compilation For Claude Code's CLI: 24% faster startup, 48% lower memory, 46% lower CPU, and nearly 2x larger binary size
68
65
22
1,380
146,866
In the next version of Bun `Bun.FetchSession` gives you a `fetch` function with its own keepalive connection pool
23
19
6
626
46,587
Replying to @bunjavascript
@bunjavascript v1.4 😍
2
2
39
3,716