-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression: hard links created by Rust no longer working #2669
Comments
Thank you for reporting this, Ingvar! cc @sunfishcode and @pchickey |
The short answer is it's a bug in Rust's WASI support; see rust-lang/rust#81984 for a fix. Shorter-term fixes are also possible, so if you need something sooner, let's discuss it. The longer answer is: POSIX's WASI's
|
@sunfishcode Thanks for the detailed explanation! It's always exciting to be hitting bugs that live in a crossover of spec and several implementations 😅 |
rust-lang/rust#81984 has been merged. Can this be closed? |
Originally reported on the Rust repo at rust-lang/rust#82277
I tried this code:
I compiled it with
--target wasm32-wasi
and executed with latest Wasmtime 0.23.0 withwasmtime --mapdir=/::.
where the current directory contains valid filea
.I expected to see this happen:
A hard link
b
is created that points toa
.Instead, this happened:
It fails with an error:
Meta
rustc --version --verbose
:wasmtime --version
:Other attempts
Equivalent C code
I've also tried to compile an equivalent C code:
When this is compiled with WASI SDK
clang --target=wasm32-wasi
and executed with the same command in Wasmtime, it successfully creates the hardlink.Node.js WASI
I've also tried to execute those Wasm files with Node.js WASI support, and both Wasm files create hard links successfully.
Older Wasmtime
Finally, I've tried to execute both with Wasmtime 0.22, and both also create hardlinks successfully, indicating a regression in Wasmtime itself.
The text was updated successfully, but these errors were encountered: