ocaml-multicore / eio

Effects-based direct-style IO for multicore OCaml
Other
560 stars 72 forks source link

Fs implementation for windows #509

Closed patricoferris closed 1 year ago

patricoferris commented 1 year ago

A WIP PR built on top of #497 adding support for filesystem operations primarily using NtCreateFile which apparently is the closest thing to openat that Windows has to offer.

polytypic commented 1 year ago

I tried this on my Windows machine and the symlink test seemed to fail. I assume that is expected? (I'll take a closer look through the code.)

patricoferris commented 1 year ago

Still WIP, I'll be revisiting it this weekend, but thanks for taking a look already!

talex5 commented 1 year ago

I squashed and rebased this PR on main, which should fix the unrelated CI errors. I'd like to do an Eio 0.10 release, and this is the only remaining issue for it. We could either release without FS support, or merge this as it is and let people fix the missing bits. Any reason not to merge?

patricoferris commented 1 year ago

Any reason not to merge?

Apart from it potentially being a bit broken particularly with the symlinking behaviour and missing functionality like pread. But, perhaps a windows backend in the wild will lower the barrier to trying it out and then getting fixes from people?

talex5 commented 1 year ago

Sounds good. We can document eio_windows as being incomplete.