-
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
fd_write should be unbuffered #255
Comments
Hi! Thanks for filing the issue. We've recently changed the implementation of |
@kanaka it should be fixed now. Could you double check against the latest upstream and confirm that it works fine for you? |
I rebuilt wasmtime and didn't get the fix. Then realized it's in a module. I tried updating the version of wasi-common in Cargo.toml and got the following link time errors:
Can you give me a hint about how I should build this? |
Ahhh, apologies for that! It seems that In terms of the error, it looks to me like you've updated the version of |
I pulled down the nightly CI build and can confirm that it is now fixed. And you're right, I did only update the wasi-common in one place without realizing there are multiple levels that depend on it. Thanks for the fix! |
* Minor fixes to prevent warnings related to Rust 2021 in the tests * Remove unnecessary references * Silence clippy Co-authored-by: Sergei Shulepov <sergei@parity.io>
fd_write should be unbuffered to match the behavior of writev. Buffering can be implemented in the application if desired, however, fd_write being buffered means there is no way to do unbuffered writes (there is no WASI flush API call and there shouldn't be at this level). This is using the dev release of wasmtime from today (95bcc63). This is a regression from a a few months ago. Note that recent builds of wasmer and lucet have unbuffered fd_write.
Here is a simple test case that should print a prompt, read a string and echo it:
And here is the behavior:
The correct behavior should be:
The text was updated successfully, but these errors were encountered: