You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cf8ffb8
Browse filesBrowse the repository at this point in the historyBrowse files
feat(build): add musl binaries for Alpine Linux support (#762)
## Summary
Closes#754
- Add `sentry-linux-x64-musl` and `sentry-linux-arm64-musl` native
binaries using Bun's built-in musl cross-compilation targets
- Add runtime musl detection so the install script and self-upgrade
download the correct binary variant
- Add Alpine Docker smoke test in CI to verify musl binaries work
## Changes
**Build system** (`script/build.ts`): Extend `BuildTarget` with `libc?:
"musl"`, add 2 musl entries to `ALL_TARGETS`, update
`getPackageName`/`getBunTarget`/`parseTarget` to handle musl suffix.
**Runtime detection** (`src/lib/binary.ts`): New `isMusl()` function
checks for `/lib/ld-musl-<arch>.so.1` (fast stat) with `ldd --version`
fallback. `getPlatformBinaryName()` appends `-musl` on musl systems —
auto-propagates to upgrade and download URLs.
**Install script** (`install`): `detect_musl` function with same two
heuristics. `libc_suffix` applied to both nightly (GHCR) and stable
(GitHub Releases) download paths. `libc` tag added to error telemetry.
**CI** (`.github/workflows/ci.yml`): `linux-x64-musl` and
`linux-arm64-musl` added to full build matrix (cross-compiled on
ubuntu-latest). Alpine Docker smoke test for x64-musl.
**No changes needed** to `.craft.yml` (regex already matches), Homebrew
formula (correctly excludes musl), or downstream consumers of
`getPlatformBinaryName()`.
0 commit comments