miri: Windows file system shims are missing
Miri supports accessing the file system (opening, reading, writing files; listing directories) on Unix systems, but not on Windows. This is probably the biggest remaining gap in our Windows support.
If you run into this, try cargo miri test --target x86_64-unknown-linux-gnu. This works even on a Windows host (without installing anything extra) and interprets programs on a well-supported Linux target – file system access should generally work then. If it doesn’t please file an issue (do not comment on this issue, instead file a new one).
Nobody on the Miri team is very knowledgeable in Windows APIs, and a reasonable work-around exists for Windows users, so this is unlikely to be on our agenda any time soon. Contributions are always welcome though. 😃
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 22 (18 by maintainers)
I’m working on this in my free time the past couple of days, and have… 6/13 functions of the shims/fs.rs test working so far. Will open a PR once everything is at least basically implemented.
Ah, yeah, good point. Nor is std::process something I personally need.
Yeah, if it’s mostly sync I/O without the fancy stuff (APC or IOCP or similar), maybe it’s not too bad. Still a significant number, but tractable, with this presumably being most of the list. https://github.com/rust-lang/rust/blob/c1b336cb6b491b3be02cd821774f03af4992f413/library/std/src/sys/pal/windows/fs.rs#L1064.