Changelog

oven-sh/bun · · 5 commits

Build, FFI, and parser fixes land

Notable fixes for compiled FFI loading, build option generation, JSON define auto-quoting, plus a major collections refactor and CI format shift.

FFI can now extract embedded shared libs for dlopen() (robobunbbd3e62)

bun:ffi now resolves embedded .so/.dylib/.dll assets from a compiled Bun executable to a real temp file before calling dlopen(). This fixes bun build --compile regressions where import ... with { type: "file" } shared libraries could not be loaded from bunfs.

Build options are generated from config instead of env var plumbing (dylan-conwaybb1973e)

bun_core::build_options now comes from a generated build_options.rs written at configure time from Config, replacing the previous BUN_* env-var handshake. That removes duplicated naming, makes bare cargo check/rust-analyzer see real values, and keeps target-specific flags evaluated per-triple.

JSON lexer stops breaking define auto-quote recovery (Jarred-Sumner314d044)

The JSON lexer now tokenizes ?, *, (, and ) instead of erroring immediately, which lets Bun’s auto-quote fallback recover unquoted define: values that aren’t valid JSON. This fixes cases like raw minified CSS strings starting with *{...} that were aborting builds too early.

multi_array_list refactor funnels unsafe ops through small primitives (dylan-conway4d443e5)

bun_collectionsmulti_array_list.rs was heavily reworked to route raw SoA operations through a smaller audited primitive set, cutting the file’s unsafe surface while preserving the single-allocation layout. The refactor also centralizes column slicing/mutation behavior, which should make future maintenance and correctness audits easier.

Other misc changes

  • CI format workflow switched from Zig fmt to cargo fmt --all.
  • Generated/formatting updates across Rust sources and workflow docs.
  • Test coverage added for JSON define auto-quoting and compiled FFI loading.