Skip to content

fix(driver): statx on musl - #669

Merged
George-Miao merged 11 commits into
compio-rs:masterfrom
Berrysoft:fix/musl-statx
Feb 11, 2026
Merged

George-Miao merged 11 commits into
compio-rs:masterfrom
Berrysoft:fix/musl-statx

Conversation

@Berrysoft

Copy link
Copy Markdown
Member

Closes #668

It would be fine to use cross-rs here...

@Berrysoft
Berrysoft requested a review from Copilot February 9, 2026 09:03
@Berrysoft Berrysoft self-assigned this Feb 9, 2026
@Berrysoft Berrysoft added bug Something isn't working driver: io-uring About the io-uring driver package: driver Related to compio-driver labels Feb 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes compio-driver builds on musl targets by avoiding unconditional libc::statx usage and adds a CI workflow to exercise musl via cross.

Changes:

  • Add a stat → statx conversion helper for non-gnu Linux targets.
  • Gate libc::statx blocking fallbacks behind #[cfg(gnulinux)], using stat/fstat on other Linux envs (e.g. musl).
  • Add a GitHub Actions workflow to run musl tests via cross.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
compio-driver/src/sys/unix_op.rs Introduces stat_to_statx to build a Statx-compatible struct from libc::stat on non-gnu Linux.
compio-driver/src/sys/iour/op.rs Splits call_blocking for FileStat/PathStat to avoid calling libc::statx on non-gnu Linux.
.github/workflows/ci_test_musl.yml Adds a new CI job intended to test musl targets using cross.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compio-driver/src/sys/iour/op.rs Resolved
Comment thread .github/workflows/ci_test_musl.yml Resolved
Comment thread .github/workflows/ci_test_musl.yml Resolved
@George-Miao George-Miao added the ci github action and other ci-related change label Feb 9, 2026

@George-Miao George-Miao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@George-Miao
George-Miao merged commit ef60b7f into compio-rs:master Feb 11, 2026
56 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 10, 2026
Berrysoft added a commit that referenced this pull request Feb 12, 2026
* fix(driver,iour): call stat for musl

* ci: test musl

* ci(musl): fix feature name

* feat: add `native-tls-vendored` feature

* fix(driver,iour): statx_mask

* fix(bench): monoio only supports gnu

* ci: enable fusion driver for musl

* fix(driver,iour): fallback of PathStat

* ci: test for arm64 musl

* fix(driver): statx_mask for linux only

* ci: fix musl config
vadorovsky added a commit to vadorovsky/cosmic-files that referenced this pull request Feb 16, 2026
It contains a fix that allows building the crate on musl:
compio-rs/compio#669
thegabriele97 pushed a commit to thegabriele97/cosmic-files that referenced this pull request Feb 18, 2026
It contains a fix that allows building the crate on musl:
compio-rs/compio#669
@Berrysoft
Berrysoft deleted the fix/musl-statx branch March 1, 2026 17:10
This was referenced Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ci github action and other ci-related change driver: io-uring About the io-uring driver package: driver Related to compio-driver

Projects

None yet

Development

Successfully merging this pull request may close these issues.

compio-driver 0.11.1 fails to compile on musl: libc::statx not found

4 participants