Dan Gohman
Dan Gohman
If it's possible to reproduce a problem using unpatched wasi-common 0.40 and Rust stable, it may make sense to consider a point release.
Looking at the test failures, this needs some more work before it's ready.
Windows has some functions which perform canonicalization. I've now submitted https://github.com/retep998/winapi-rs/pull/992 to add bindings to these in winapi, so we can experiment with using those instead of trying to do...
Another option is to use [windows-rs](https://github.com/microsoft/windows-rs). That seems like the next thing to try here.
Use `NtCreateFile` instead of `NtOpenFile`; see https://github.com/rust-lang/rust/pull/93206.
Oh wow, I wasn't previously aware that windows-sys has bindings for [`NtCreateFile`](https://docs.rs/windows-sys/latest/windows_sys/Win32/Storage/FileSystem/fn.NtCreateFile.html) and [`NtOpenFile`](https://docs.rs/windows-sys/latest/windows_sys/Win32/System/WindowsProgramming/fn.NtOpenFile.html).
Also, cap-std needs the ability to create files, so it appears we do need `NtCreateFile`. One thing we'll need to figure out is how to map from [security QoS flags](https://doc.rust-lang.org/stable/std/fs/struct.OpenOptions.html#method.security_qos_flags)...
We should also think about adding a function which creates a directory and opens it as a new `Dir`, for the common case where one does `create_dir_all` followed by `open_dir`....
To be fair, with GC in the platform, non-Web implementations of wasm may be forced into implementing a GC that they otherwise might not have needed. All browser-based wasm implementations...
It wouldn't just be a change to LLVM; it'd be a new C ABI. The existence of such a wasm C ABI might benefit a small number of people, but...