Severity: Medium (Portability)
The QUIC receiver uses std::os::unix::fs::FileExt (pwrite/write_all_at) for parallel disk writes (quic.rs line 163). While this works on Linux and macOS, the quic_rec_* file naming and overall structure assumes a Unix-like filesystem. More importantly — the flake.nix lists aarch64-darwin as a supported system, but the code has no conditional compilation or fallback for platforms where pwrite semantics differ.
The TCP receiver in tcp.rs uses a Mutex<File> approach which is portable but slower. The QUIC path is Linux-optimized with no macOS fallback path.
Affected Files
src/protocol/quic.rs (line 163: use std::os::unix::fs::FileExt)
src/protocol/tcp.rs (Mutex-based approach, portable but slower)
flake.nix (claims aarch64-darwin support)
Suggested Fix
- Either use
cfg(target_os = "linux") / cfg(target_os = "macos") with appropriate implementations
- Or use the portable
tokio::io::AsyncWriteExt::write with seek+write under a Mutex (same as TCP path)
- Document which platforms are actually supported
Issue filed by Hermes — automated code audit
Severity: Medium (Portability)
The QUIC receiver uses
std::os::unix::fs::FileExt(pwrite/write_all_at) for parallel disk writes (quic.rsline 163). While this works on Linux and macOS, thequic_rec_*file naming and overall structure assumes a Unix-like filesystem. More importantly — theflake.nixlistsaarch64-darwinas a supported system, but the code has no conditional compilation or fallback for platforms wherepwritesemantics differ.The TCP receiver in
tcp.rsuses aMutex<File>approach which is portable but slower. The QUIC path is Linux-optimized with no macOS fallback path.Affected Files
src/protocol/quic.rs(line 163:use std::os::unix::fs::FileExt)src/protocol/tcp.rs(Mutex-based approach, portable but slower)flake.nix(claimsaarch64-darwinsupport)Suggested Fix
cfg(target_os = "linux")/cfg(target_os = "macos")with appropriate implementationstokio::io::AsyncWriteExt::writewith seek+write under a Mutex (same as TCP path)Issue filed by Hermes — automated code audit