On Unix, if you attempt to hard-link a directory, you get not-permitted. On Windows, you get access. Can these be made the same or should they be documented to be different?
Command line:
wasmtime -Wcomponent-model-async -Sp3,http --dir 'tests\rust\testsuite\wasm32-wasip3\fs-tests.dir::fs-tests.dir' 'tests\rust\testsuite\wasm32-wasip3\filesystem-hard-links.wasm'
Log:
Test filesystem-hard-links failed
[exit_code] 0 == 3
STDOUT:
STDERR:
thread '<unnamed>' (1) panicked at src/bin/filesystem-hard-links.rs:32:5:
assertion `left == right` failed
left: Err(ErrorCode { code: 0, name: "access", message: "Permission denied, similar to `EACCES` in POSIX." })
right: Err(ErrorCode { code: 30, name: "not-permitted", message: "Operation not permitted, similar to `EPERM` in POSIX." })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Error: failed to run main module `tests\rust\testsuite\wasm32-wasip3\filesystem-hard-links.wasm`
File: https://github.com/WebAssembly/wasi-testsuite/blob/main/tests/rust/wasm32-wasip3/src/bin/filesystem-hard-links.rs