@jarredsumner

building @bunjavascript at @anthropicai. formerly: @stripe (twice) @thielfellowship. high school dropout. npm i -g bun

San Francisco, CA
Joined May 2014
People frequently ask: > How is Bun sustainable? If I bet my company’s tech stack on Bun, will Bun still be around in a few years? We didn’t have a great answer to this question, until today
265
143
59
4,741
1,369,825
Jarred Sumner retweeted
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
21
41
14
621
22,890
a lot of my job now is telling claude “you need to think bigger”
104
47
16
1,456
40,258
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.
this was my 3rd attempt at Bun AOT. the first two were before `bun check`, and performed worse than the JIT. it used bytecode instead of typescript types. binaries were sometimes 1 GB lol trying attempt 4 now. doesn’t work yet
39
2
5
745
33,576
The remaining runtime behavior change, which the 3rd attempt also did, is a JavaScript behavior change that is small and also security hardening Object.prototype is “locked”, and a handful of other JavaScript builtins can’t be reassigned / writable. This impacts some polyfills.
3
79
5,553
Jarred Sumner retweeted
A year ago I would not have believed you if you told me Bun would get a formatter, a linter, and a type checker, and be (re)written in Rust, all in like 4 months
9
5
189
8,781
i genuinely think good AOT JS/TS with full ecosystem compatibility would be the most exciting thing to happen to JavaScript since Node
59
23
14
1,000
64,174
the knock on server-side JS has always been that you only use it because you already know it. rEaL enGiNeeRs use Go or RuSt LLMs know every language so that doesn't matter anymore, but the substance behind that knock is still true - JS uses more memory and CPU
5
152
12,198
however, LLMs are also really good at writing compilers. so instead of you rewriting your app in another language, what if we just rewrite the compiler to make JS/TS perform competitively with Go and Rust then rewriting your app might not be worth it, even if it’s easy
10
1
260
10,865
Why are there like six parsing passes? Why does the trimmer think Bun.Archive is in use when you have a property named “Archive” somewhere? The results are exciting, but these questions sound like a bug farm.
2
73
6,537
I want this to be good. So another implementation, with a more refined design seems worth it. But the same underlying idea - TypeScript types -> IR as the starting point. sound types when proven, predictions, or unknown
3
57
4,499
In the next version of Bun bun check gets 1.7x - 7x faster
58
26
9
1,238
52,304
Here's a little how Bun AOT currently works (and may still change a lot): 1. bun build --compile --aot <script> 2. `bun check` type-checks but allows untyped code 3. Typed IR 4. Optimization passes 5. JavaScriptCore's B3 compiler runs 6. ARM64/x64 machine code (continued)
33
8
4
431
28,295
JSON.stringify's fast path for typed objects makes JSON.stringify 2.2x faster in this benchmark. Untyped objects or typed objects with extra properties fallback to the generic JSON.stringify
3
33
3,968
RegExp literals get compiled ahead of time
43
3,591