fitzgen closed issue #1358:
Windows distinguishes between file symlinks and directory symlinks. It's possible to create a dangling symlink, but the type (file/directory) has to be specified upfront, upon creation.
The behavior in case of type mismatch is inconsistent. Precisely, suppose that a dangling file symlink is created
foo -> barand later, a directorybaris created. Then:* under msys64 bash,
cd foosucceeds and the directory view is the same when access either directly or through the symlink
* under cmd (both windowed and as a child process from msys64 bash).cd foofails withThe directory name is invalid
* under Windows Explorer, the dangling symlink is invisibleWe should decide how WASI should handle a request to create a dangling symlink. Possible ideas:
- default to file symlinks, make sure that WASI can correctly handle them even in case of type mismatch and neglect the fact that they may be broken outside WASI
- as in 1., but correct the symlinks when encountered/upon close/etc.
- deny creating dangling symlinks altogether and modify the tests to disallow it (it may break existing code! so probably a bad idea)
cc @kubkon @sunfishcode @peterhuene
fitzgen commented on issue #1358:
WASI semantics are part of the WASI spec which has not been part of this repo for a long time, reopen on the WASI standard repo if still an issue.
Last updated: Oct 11 2026 at 04:10 UTC