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

ALT bun build --compile --aot --trim, with --trim highlighted. A block representing an 89 MB executable from Bun 1.4.4 on macOS arm64 is being cut up with scissors. The part that stays is pink: 25 MB for hello world, 34 MB with Bun.serve, 44 MB with node:http. The rest is cut into paper scraps, each crossed out: bun install, bun test, bun check, bun build, bun lint, bun fmt, WebAssembly, debugger, JIT compilers.
maybe we should be looking to go back to js haha
Oct 28, 2026 · 12:05 AM UTC


