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
WASI: Can't open a file with both truncate and append flags #861
Comments
I believe this is a result of this check in cap-std. Wasmtime does not have this problem because it no longer uses cap-std in preview1. |
@yagehu Thank you for reporting this issue! Wasmi uses Wasmtime's WASI implementation because it is a huge amount of work to re-implement WASI yourself. However, since then their WASI implementation made it impossible for other runtime such as Wasmi to use newer versions and thus we cannot easily fix this problem. There are 2 options forward to fix WASI issues for Wasmi:
|
Totally fair assessment. I tested removing the check I linked in cap-std and it indeed works without it. Apparently Wasmtime now uses |
You are welcome to experiment with integrating wasmtime-wasi into Wasmi. :) |
Compile this snippet with wasi-sdk and run it with wasmi will generate an invalid argument error. It does NOT error on other runtimes like Wasmtime or on native Linux.
The text was updated successfully, but these errors were encountered: