Skip to content

feat: build and test musllinux wheels for Alpine/musl platforms - #16

Merged
imfing merged 4 commits into
mainfrom
feat/musl-wheels
Oct 3, 2026
Merged

imfing merged 4 commits into
mainfrom
feat/musl-wheels

Conversation

@imfing

@imfing imfing commented Oct 3, 2026 •

Copy link
Copy Markdown
Owner

Why

rusty_v8 ships musl prebuilts since v150.2.0 — and the deno_core 0.412 bump (#10) landed us on v150.4.0, just past that threshold. musl has no glibc-style symbol versioning, so the entire problem that forces our self-hosted gnu archives doesn't exist here: upstream assets are directly consumable, making Alpine support a pure CI addition.

flowchart LR
    GNUREL[("librusty_v8-v{ver} release (ours)")] -.->|RUSTY_V8_ARCHIVE| GNU[linux: manylinux_2_28 wheels]
    UPREL[("denoland rusty_v8 release")] -.->|auto-download| MUSL[linux-musl: musllinux_1_2 wheels]
    GNU --> T1[test 3.10-3.14 x 2 arches]
    MUSL --> T2[test 3.10-3.14 x 2 arches, python:alpine]
Loading

Mechanism

linux-musl job (free runners, x86_64 + native aarch64):
    RUSTFLAGS = -C target-feature=-crt-static   # ext modules need dynamic musl
    maturin build --manylinux musllinux_1_2     # rusty_v8 fetches upstream musl .a itself

test-wheels-musl: docker run python:{3.10..3.14}-alpine pytest
    # via docker, not `container:` - node-based actions can't execute on musl

Blast radius

Area Impact
CI.yml +2 jobs: linux-musl (2 wheels), test-wheels-musl (10-job matrix); release gains deps
Release artifacts 3 wheels → 5 (adds musllinux_1_2_{x86_64,aarch64}, cp310-abi3)
verify-v8-archive.yml Matrixed: gnu leg (our archive) + 2 musl legs (upstream prebuilts)
docs/quickstart Alpine/musl: unsupported → supported
gnu pipeline, runtime code, archive workflow Untouched

Evidence

  • Link verification: upstream musl prebuilts pass the whole-archive -z,defs test inside musllinux_1_2 containers, both arches — run 37123820138
  • Full CI from this branch green across all 27 jobs: run 37123973126 — musl wheels in ~2m15s, 302 tests passing on every python:alpine combination

Also in this PR (housekeeping)

Change Why
Dedup: .github/scripts/v8-version.sh The Cargo.lock v8-version parse existed in 4 places
build-v8-archive.yml matrix simplified Target triple + Dockerfile now derived from arch name
Comments tightened across .github/ glibc-drift story told once (Dockerfile.x86_64), one-liners elsewhere
Drop dtolnay/rust-toolchain from macos job rust-toolchain.toml + preinstalled rustup already pin the version
upload-artifact v4→v7, download-artifact v6→v8, stray checkout v4→v5 v4 targets deprecated Node 20 (CI annotation)
Drop PyPy trove classifier abi3 wheels serve CPython only; PyPy would be sdist-only and is untested

Each increment validated by branch dispatches of CI + verify (all green).

imfing added 4 commits October 3, 2026 13:43
denoland ships musl prebuilts of rusty_v8 since v150.2.0 (our deno_core
0.412 bump landed on v150.4.0, just past the threshold), and musl has
no glibc-style symbol versioning, so the upstream archives are directly
consumable - verified via whole-archive -z,defs link tests inside
musllinux_1_2 containers on both architectures.

- linux-musl job: musllinux_1_2 wheels for x86_64 + aarch64 on free
  runners; RUSTFLAGS=-C target-feature=-crt-static since extension
  modules need dynamic musl.
- test-wheels-musl: full 3.10-3.14 matrix inside python:alpine
  containers via docker run (node-based actions can't execute on musl).
- docs: musl/Alpine now listed as supported.
…lchain action

- Extract the Cargo.lock v8-version parse (4 copies) into
  .github/scripts/v8-version.sh.
- Derive target triple and Dockerfile from the arch name in
  build-v8-archive.yml, replacing the inline fromJSON matrix objects.
- Keep the glibc-drift story in one place (Dockerfile.x86_64); trim the
  retellings elsewhere to one-liners.
- Drop dtolnay/rust-toolchain from the macos job: rust-toolchain.toml +
  preinstalled rustup already pin the version.
…yPy classifier

- upload-artifact@v4 targets deprecated Node 20 (CI annotation); bump
  both artifact actions to current majors and the stray checkout@v4 in
  sdist to v5.
- Remove the PyPy classifier: abi3 wheels only serve CPython; PyPy
  would be sdist-only and is untested.
@imfing
imfing merged commit 803ecf8 into main Oct 3, 2026
28 checks passed
@imfing
imfing deleted the feat/musl-wheels branch October 3, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant