mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 14:51:52 +00:00
Implement support for the `libc` field in package.json, which is used by packages like @rollup/rollup-linux-x64-gnu and @rollup/rollup-linux-x64-musl to specify which libc variant they require. Changes: - Add `libc` field to lockfile `Meta` struct - Implement compile-time libc detection (glibc vs musl on Linux, .all elsewhere) - Update `isDisabled()` to check libc in addition to cpu and os - Add `--libc` CLI flag for manually overriding libc (like `--cpu` and `--os`) - Add libc serialization/deserialization for bun.lock and pnpm lockfiles - Parse `libc` field from package.json The isMatch logic handles backwards compatibility by treating `.none` (unset) the same as `.all`, so packages without a libc field match any system libc. Fixes #26156 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>