-
Notifications
You must be signed in to change notification settings - Fork 824
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
Appending to file does not work #936
Comments
If you execute it with wasmtime, does it have the same problem? |
Looks like there's no logic for append here: https://github.com/wasmerio/wasmer/blob/master/lib/wasi/src/syscalls/mod.rs#L1726-L1742 |
With wasmtime the program does not execute at all, I get the following error:
|
Seems like it's an fdflag __WASI_FDFLAG_APPEND |
Thanks for reporting this! I'll investigate and ship a fix |
939: Fix WASI append bug, add test r=MarkMcCaskey a=MarkMcCaskey resolves #936 Co-authored-by: Mark McCaskey <[email protected]>
939: Fix WASI append bug, add test r=syrusakbary a=MarkMcCaskey resolves #936 Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
938: Fuzz all the backends. r=nlewycky a=nlewycky ![](https://i.imgflip.com/3fq2bw.jpg) 939: Fix WASI append bug, add test r=MarkMcCaskey a=MarkMcCaskey resolves #936 Co-authored-by: Nick Lewycky <[email protected]> Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
939: Fix WASI append bug, add test r=MarkMcCaskey a=MarkMcCaskey resolves #936 Co-authored-by: Mark McCaskey <[email protected]> Co-authored-by: Syrus Akbary <[email protected]>
I am trying to run a simple wasm program, see code here
I am running:
wasmer run --dir=. demo.wasm '{"a":"txt", "b":1}'
which should append
txt 1
to alog.txt
file.However, the data is not appending but instead writing over. The same program compiled with native Rust (non-wasm) appends properly.
The text was updated successfully, but these errors were encountered: