Closed cataggar closed 2 months ago
cc @nodejs/wasi
@cjihrig do you remember why uvwasi_fd_readdir
is stubbed out on windows?
Confirming that it does work on Linux using WSL2 Debian with "/ev2": "/mnt/c/Users/cataggar/ev2",
. The problem is limited to Windows.
/mnt/c/Users/cataggar/configur> node main.js -- /ev2
ExperimentalWarning: WASI is an experimental feature and might change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
source: /ev2
exists: true
is_dir: true
# of dir entries: 4
dir entry: Ok(DirEntry("/ev2/environments"))
dir entry: Ok(DirEntry("/ev2/flags.yml"))
dir entry: Ok(DirEntry("/ev2/README.md"))
dir entry: Ok(DirEntry("/ev2/rules.yml"))
@devsnek I'm not 100% sure anymore, but I believe there was an issue with supporting the cookie input properly on Windows.
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
I'm trying to run a WASI application from Node.js v20.5.1 and listing directory entries is not working. I added it in
preopens
. The check to see if it exists if it is a directory works.The same WASI works using Wasmtime.
Node.js version
v20.5.1 winget upgrade --id OpenJS.NodeJS
Example code
Full project is in the
nodejs
branch here. https://github.com/cataggar/configur/tree/nodejscargo install cargo-wasi cargo wasi build --release node main.js -- /ev2
You will need to change the hardcoded
preopens
path from main.js:main.rs is pretty straight forward:
Operating system
Windows 11 22H2
Scope
WASI preview1
Module and version
WASI