haraldh edited PR #5326 from table_immutable
to main
:
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
haraldh edited PR #5326 from table_immutable
to main
:
This patch adds interior mutability to the WasiCtx Table.
It also adds interior mutability to the WasiCtx Table.Major pain points:
File
only needsRwLock<cap_std::fs::File>
because of https://github.com/bytecodealliance/system-interface/blob/da238e324e752033f315f09c082ad9ce35d42696/src/fs/fd_flags.rs#L210-L217- Because
File
needs aRwLock
andRwLock*Guard
cannot be hold across an.await
, Theasync
fromasync fn num_ready_bytes(&self)
had to be removed- Because
File
needs aRwLock
andRwLock*Guard
cannot be dereferenced inpollable
, the signature offn pollable(&self) -> Option<rustix::fd::BorrowedFd>
changed tofn pollable(&self) -> Option<Arc<dyn AsFd + '_>>
haraldh edited PR #5326 from table_immutable
to main
:
This patch adds interior mutability to the WasiCtx Table.
It also adds interior mutability to the WasiCtx Table.Major pain points:
File
only needsRwLock<cap_std::fs::File>
to implementFile::set_fdflags()
on Windows, because of https://github.com/bytecodealliance/system-interface/blob/da238e324e752033f315f09c082ad9ce35d42696/src/fs/fd_flags.rs#L210-L217- Because
File
needs aRwLock
andRwLock*Guard
cannot be hold across an.await
, Theasync
fromasync fn num_ready_bytes(&self)
had to be removed- Because
File
needs aRwLock
andRwLock*Guard
cannot be dereferenced inpollable
, the signature offn pollable(&self) -> Option<rustix::fd::BorrowedFd>
changed tofn pollable(&self) -> Option<Arc<dyn AsFd + '_>>
haraldh edited PR #5326 from table_immutable
to main
:
This patch adds interior mutability to the WasiCtx Table and the Table elements.
Major pain points:
File
only needsRwLock<cap_std::fs::File>
to implementFile::set_fdflags()
on Windows, because of https://github.com/bytecodealliance/system-interface/blob/da238e324e752033f315f09c082ad9ce35d42696/src/fs/fd_flags.rs#L210-L217- Because
File
needs aRwLock
andRwLock*Guard
cannot be hold across an.await
, Theasync
fromasync fn num_ready_bytes(&self)
had to be removed- Because
File
needs aRwLock
andRwLock*Guard
cannot be dereferenced inpollable
, the signature offn pollable(&self) -> Option<rustix::fd::BorrowedFd>
changed tofn pollable(&self) -> Option<Arc<dyn AsFd + '_>>
haraldh has marked PR #5326 as ready for review.
haraldh updated PR #5326 from table_immutable
to main
.
haraldh updated PR #5326 from table_immutable
to main
.
haraldh updated PR #5326 from table_immutable
to main
.
haraldh submitted PR review.
haraldh created PR review comment:
@alexcrichton it's because Windows has to reopen the file with new Flags, rather than modifying the current handle. There is just no native function for this.
haraldh has marked PR #5326 as ready for review.
Last updated: Nov 22 2024 at 16:03 UTC