Fix debug-tools musl build: gate tokio-uring on non-musl targets (#10419)

The debug-tools workflow cross-compiles for x86_64-unknown-linux-musl,
but tokio-uring 0.5.0 requires libc::statx which is unavailable on musl.
Skip the tokio-uring dependency on musl and fall back to sync io_uring reads.
This commit is contained in:
qdrant-cloud-bot
2026-09-03 12:45:55 +02:00
committed by timvisee
parent d2c46a34ce
commit 2298957fe7
2 changed files with 16 additions and 3 deletions
+5
View File
@@ -69,6 +69,11 @@ tango-bench = "0.8.0"
io-uring = "0.7.12"
procfs = { version = "0.18", default-features = false }
thread-priority = "3.0.0"
# tokio-uring uses libc::statx, which is unavailable on x86_64 musl in libc
# (see https://github.com/tokio-rs/tokio-uring/issues/316). Debug tools are
# built for x86_64-unknown-linux-musl; async reads fall back to the sync path.
[target.'cfg(all(target_os = "linux", not(target_env = "musl")))'.dependencies]
tokio-uring = "0.5.0"
[[bench]]
@@ -2,6 +2,7 @@ mod error;
mod pipeline;
mod pool;
mod runtime;
#[cfg(not(target_env = "musl"))]
mod tokio_bridge;
#[cfg(test)]
@@ -220,9 +221,16 @@ impl UniversalRead for IoUringFile {
_access_pattern: P,
align: usize,
) -> UioResult<ACow<'_>> {
Ok(ACow::Owned(
tokio_bridge::read_bytes_async(self, range, align).await?,
))
#[cfg(not(target_env = "musl"))]
{
return Ok(ACow::Owned(
tokio_bridge::read_bytes_async(self, range, align).await?,
));
}
#[cfg(target_env = "musl")]
{
self.read_bytes::<P>(range, _access_pattern, align)
}
}
fn len<T>(&self) -> UioResult<u64> {