abrown opened issue #5643:
In https://github.com/bytecodealliance/wasmtime/pull/5326, we discussed extensively how to resolve the build errors related to
fd_fdstat_set_flags
, awasi-common
function. When attempting to apply locking towasi-common
to enable multi-threaded access, this function was the sole remaining issue preventing the implementation ofWasiSnapshotPreview1
from using&self
(what we wanted to switch to) instead of the current&mut self
. Iffd_fdstat_set_flags
could take&self
instead, this would result in a variety of benefits:
- there would be no need to wrap
WasiCtx
(and friends) in an inner structure containing anArc
; theArc
could be applied to the top-levelHost
structure instead- all of
WasiSnapshotPreview1
could be implemented in terms of&self
instead of&mut self
- several supporting
derive(Clone)
and mutating functions could go awayAt some point I had heard of discussions to modify this API; if and when that happens, the above improvements could be made.
alexcrichton labeled issue #5643:
In https://github.com/bytecodealliance/wasmtime/pull/5326, we discussed extensively how to resolve the build errors related to
fd_fdstat_set_flags
, awasi-common
function. When attempting to apply locking towasi-common
to enable multi-threaded access, this function was the sole remaining issue preventing the implementation ofWasiSnapshotPreview1
from using&self
(what we wanted to switch to) instead of the current&mut self
. Iffd_fdstat_set_flags
could take&self
instead, this would result in a variety of benefits:
- there would be no need to wrap
WasiCtx
(and friends) in an inner structure containing anArc
; theArc
could be applied to the top-levelHost
structure instead- all of
WasiSnapshotPreview1
could be implemented in terms of&self
instead of&mut self
- several supporting
derive(Clone)
and mutating functions could go awayAt some point I had heard of discussions to modify this API; if and when that happens, the above improvements could be made.
Last updated: Nov 22 2024 at 16:03 UTC