Changelog

oven-sh/bun · · 9 commits

Markdown ANSI rendering lands in Bun

Bun gains a terminal markdown renderer, Linux os.freemem() now matches Node, and usockets DNS cancellation gets safer.

Bun can now render markdown directly to ANSI text (robobunfa6f69f) Bun.markdown.ansi() adds a fast path for .md entrypoints that prints styled terminal output without spinning up the JS VM. It supports headings, lists, tables, code highlighting, links, images, and theme options like width, hyperlinks, and Kitty graphics.

Linux os.freemem() now reports MemAvailable (robobune106942) Bun’s Linux memory API now matches Node/libuv by reading /proc/meminfo first and falling back to sysinfo.freeram only when needed. This fixes a real discrepancy where Bun underreported available memory on systems with reclaimable page cache.

Connecting sockets now safely cancel pending DNS work (cirospaciaric6e2bf8) usockets now tracks the addrinfo request on the connecting socket, can cancel pending DNS callbacks before they fire, and frees the request in the closed-after-resolve path. This closes a lifetime/race hole around sockets being closed while resolution is still in flight.

Pending DNS resolution keeps the context alive correctly (cirospaciari218bf20) A context ref is now held for the full lifetime of pending_resolve_callback, preventing the resolve callback from running against a dead context after close/unlink churn. That should eliminate a crash class in the connect path on Linux x86_64.

Linux local builds switch to the parallel Zig compiler (alii68e80db) The build scripts now enable the parallel Zig compiler on Linux local builds as well, while CI and Windows remain on the stable compiler. The change reflects a performance-oriented compiler rollout, with batching fixes in Zig’s ELF merge path to avoid the earlier syscall-heavy hang.

Other misc changes

  • Windows ARM64 CI image/runner update to local-NVMe Dpdsv6 sizes (dylan-conway4ee606e)
  • Build/Zig config updates and temporary compiler- चयन refactors (dylan-conwayd4e8fb9, alii700fc11)
  • Claude helper command/workflow tweaks for issue/duplicate PR triage (Jarred-Sumner6f649d6)
  • WIP build script adjustments and small build plumbing updates (alii700fc11, dylan-conwayd4e8fb9, dylan-conwayd4e8fb9)