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
1
1 comments
On macOS, a binary that uses Bun.serve’s HTTP server goes from 89 MB to 25 MB
“Why is it still 25 MB?”
JavaScriptCore & Bun optimizes for speed instead of binary size, and that’s part of what lets memory allocation with Bun AOT outperform languages like Go. Concurrent GC and the object model costs code size.
But there’s certainly room to improve here