-
Notifications
You must be signed in to change notification settings - Fork 1.6k
chore: bump to wasi 0.3.0-rc-2026-02-09 #12557
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
base: main
Are you sure you want to change the base?
Conversation
| impl stdin::Host for WasiCliCtxView<'_> {} | ||
|
|
||
| impl stdout::HostWithStore for WasiCli { | ||
| async fn write_via_stream<U>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The primary changes in this rc were driven by: WebAssembly/WASI#870
9f0a2f4 to
5bf9c47
Compare
| let file = get_file(store.get().table, &fd)?; | ||
| if !file.perms.contains(FilePerms::WRITE) { | ||
| return Ok(FutureReader::new(&mut store, async { | ||
| wasmtime::error::Ok(Err(ErrorCode::NotPermitted)) | ||
| })); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this, append_via_stream below, and send with TCP, the ? here and the permission check all need to go into a created FutureReader. Here the call to get_file failing in ? will trigger a trap as opposed to an error code, but the file-not-writable case is handled just fine here. In TCP down below the two ? present there need to be funneled into a returned FutureReader, however.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is applicable to read_directory below too a bit. One thing I might recommend is using and_then or similar combinators to avoid using ? in the function bodies and that should make it a bit easier to see the flow of things.
Another option would be to remove the trappable option for these imports in the bindgen! configuration. That'll remove the wasmtime::Result layer of the return value and force us to implement this in a non-trapping fashion.
5bf9c47 to
458b3ba
Compare
No description provided.