wingo requested wasmtime-wasi-reviewers for a review on PR #12137.
wingo opened PR #12137 from wingo:canonicalize-hard-link-errors to bytecodealliance:main:
On Windows, attempting to hard-link a directory gave ErrorCode::Access instead of NotPermitted. Fix it in the wasi crate instead of cap-std or wasi-common because it's where the sync/tokio configurations flow. Should fix wasmtime for
https://github.com/WebAssembly/wasi-testsuite/issues/177.<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
wingo updated PR #12137.
As with https://github.com/bytecodealliance/wasmtime/pull/12136#issuecomment-3626295657, I don't have a Windows system on which to test, just that the fix seems right (and will be tested via wasi-testsuite).
rvolosatovs submitted PR review.
rvolosatovs created PR review comment:
Isn't this
into()redundant?
Looking at L928 it appears that theerris alreadyErrorCode?
rvolosatovs submitted PR review.
wingo submitted PR review.
wingo created PR review comment:
hard_linkappears to returnerrasstd::io::Error. In any case that is what the compiler thinks :)
wingo closed without merge PR #12137.
It turns out this commit is a mistake; there are cases in which Windows can return EACCESS that aren't related to hard-links to directories. So, instead I filed https://github.com/WebAssembly/WASI/pull/848 to relax the spec and loosened the wasi-testsuite test.
Last updated: Dec 13 2025 at 19:03 UTC