sunfishcode opened PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
sunfishcode updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
kubkon updated PR #1375 from pass-handle-by-ref
to master
:
This is a draft PR partially illustrating the idea mentioned in #1202 for passing
Fd
handles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_raw
function. It also simplifies theFdPool
, by taking advantage of the newEntryTable
.This doesn't build at the moment, because it doesn't change the wiggle code, but it shows how the rest of the code would look.
Fd
is passed by reference when it's an argument in host code.Fd
no longer needs to implementCopy
orClone
.- File descriptors within structs --
types::SubscriptionU::FdRead
andtypes::SubscriptionU::FdWrite
still need to be stored asu32
; it can be converted to anFd
by calling theunsafe
from_raw
In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBy
kind inwitx
?
sunfishcode closed without merge PR #1375.
Last updated: Nov 22 2024 at 16:03 UTC