Type-check acyclic-fs on aarch64 Linux and widen nlink losslessly
Merged
VA
3d ago+23+23+01234567890123456789-2-2-0123456789
Problem
Cloud found acyclic-fs fails to compile on aarch64 Linux: rust/crates/filesystem/src/native_host/stat.rs:86 and :165, E0308. libc nlink_t is u32 on aarch64 and u64 on x86_64. SDK CI never compiles for arm, so it reached main.
Fix
- A generic
lossless<T, U: From<T>>helper (Linux only) for both sites. It is lossless on each width and never a same-typeFrom(no clippyuseless_conversion, noas). - New
SDK aarch64 Linux checkjob in SDK Static on the freeubuntu-24.04-armrunner (public repo):cargo check --locked -p acyclic-fs --lib --features s3-http.
Tests run
- bb1 x86_64:
cargo check --locked -p acyclic-fs --lib --features s3-httppasses. Its only warning is the pre-existing unusedgeneration_from_head_record_valueon main. - aarch64: proven by this PR's new CI job.
š¤ Generated with Claude Code
Summary by cubic
Fixes acyclic-fs failing to compile on aarch64 Linux, where libc's nlink_t is u32 rather than u64.
HostStat::nlinkandfrom_statxinstat.rsused width-specific libc types that only compiled on x86_64.- A Linux-only generic
losslesshelper converts viaFrom<T>, which is lossless on both widths and avoids same-type conversions orascasts. - Adds an
SDK aarch64 Linux checkjob tostatic.ymlon theubuntu-24.04-armrunner and admits that runner inscripts/check-workflow-runners.mjsso a width-dependent break can't reach main again.