Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: copy bytes from shared memory for
fd_write
Previous Wiggle changes (bytecodealliance#5229, bytecodealliance#5264) made it possible to access slices of WebAssembly linear memory from Wiggle but limited the interface so that slices of shared memory could only be accessed either `unsafe`-ly or via copying (`GuestPtr::to_vec`). This change modifies `fd_write` to unconditionally copy the bytes to be written before passing them to Rust's standard library in an `IoSlice`. This is likely not the optimal solution but enables further `wasi-threads` development. In the future this commit should probably change to conditionally copy the bytes when shared memory is detected and expand to fix up all the `expect` errors of the same kind in `preview_1.rs`.
- Loading branch information