Changelog

oven-sh/bun · · 22 commits

Bun sheds more unsafe ownership plumbing

Large refactors made callbacks, resources, and event loops owned types instead of raw pointer dance, plus a notable tar/npm behavior change.

Bun keeps replacing raw-pointer ownership with typed owners (dylan-conway181ee9f, dylan-conway1ae1ed5, dylan-conwaye4cbe17, dylan-conwaye46ece8, dylan-conway6ea0fc9, dylan-conway9564c16, dylan-conway751d4ed, dylan-conway4df48e4, dylan-conway9b72307, dylan-conwayb514dd9, dylan-conway7f0db35, dylan-conway2a42fc3, dylan-conway9d12a53, dylan-conway0554db8, dylan-conwaye0c9596, dylan-conway4cf6d10, dylan-conway9c4f436, dylan-conwayb6f9cfa)

Across bundling, install, DNS, shell, streams, and event-loop code, a long series of commits replaced handwritten vtables, callback tables, and manual cleanup paths with enums, trait objects, Box<Self>, Owned* wrappers, and reference-counted handles. The net effect is far less unsafe code and much clearer lifetime ownership around core runtime subsystems.

Tar/npm mode now matches npm more closely (dylan-conwayd4596e9)

The tar reader’s npm mode was tightened to follow npm’s behavior in more places, including filename handling and gzip-layer expectations, while keeping the general archive mode separate. This matters for install/publish interoperability and for edge cases where Bun previously accepted tarballs npm would reject.

Other misc changes

  • HTTP/2 auto-flush ref cleanup and associated borrow-lifetime adjustments
  • Thread-pool deinit ownership cleanup for worker shutdown
  • Blob/source-map/internal resource ownership refactors
  • Markdown parser typed-vector refactor
  • Misc baseline/test updates and small supporting edits