Skip to content

Add musllinux and Alpine build support - #84

Merged
timkpaine merged 3 commits into
mainfrom
fix/pr-82-musllinux
Sep 29, 2026
Merged

timkpaine merged 3 commits into
mainfrom
fix/pr-82-musllinux

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Description

Detect musl Linux environments, select matching Rust musl targets, and disable static CRT for dynamic Rust artifacts while keeping executable and static-library builds static.

The branch also preserves detected musllinux policy versions, supports all auditwheel musllinux architectures exposed by the existing target model, and handles explicit Rust crate and target-feature arguments.

This repository-owned branch replaces #82 because its source fork does not allow maintainer edits. The original commit and authorship are preserved, followed by reviewed corrections.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor / code cleanup
  • CI / build configuration
  • Other (describe below)

Checklist

  • Linting passes (make lint)
  • Tests pass (make test)
  • New tests added for new functionality
  • Documentation updated (if applicable)
  • Changelog / version bump (if applicable)

Ichunjo and others added 3 commits September 29, 2026 03:46
- Auto-detect musl Linux environments via AUDITWHEEL_PLAT and packaging.tags.platform_tags()
- Support platform prefixes matching "musl*" in platform normalization and target mapping
- Auto-resolve host musl targets (e.g. x86_64-unknown-linux-musl) when building in musl environments
- Automatically pass -C target-feature=-crt-static to rustc_args for cdylib/extension artifacts on musl
- Preserve static CRT linking for musl executable (bin) targets and honor custom user target-features
- Add unit tests for musllinux target resolution and cdylib/bin flag generation
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
@codecov

codecov Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.16%. Comparing base (5feeccb) to head (db17889).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   86.67%   87.16%   +0.49%     
==========================================
  Files          12       12              
  Lines        1561     1621      +60     
==========================================
+ Hits         1353     1413      +60     
  Misses        208      208              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timkpaine
timkpaine merged commit f63bf62 into main Sep 29, 2026
6 checks passed
@timkpaine
timkpaine deleted the fix/pr-82-musllinux branch September 29, 2026 15:05
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.

2 participants