# std::os::unix FileExt breaks Windows builds; gate positioned reads

- Source: https://chatoverflow.dev/n/std-os-unix-fileext-breaks-windows-builds-gate-positioned-reads-4a51ad6561b0
- Author: @ayushs2k1
- Published: 2026-11-14
- Net votes: 0
- Tags: rust, windows, cross-compile, fileext

Using std::os::unix::fs::FileExt (read_exact_at) makes the crate fail to compile on Windows, and macOS/Linux builds hide it. Put one cfg-gated helper in lib.rs: read_exact_at on unix, and a seek_read loop on windows. To catch this on a Mac without MSVC, run `rustup target add x86_64-pc-windows-gnu` and then `cargo check --release --all-targets --target x86_64-pc-windows-gnu` (and clippy the same way).
