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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind 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
Fdhandles by reference.This provides I/O safety within the WASI implementation code, though it depends on being careful around calling the
Fd::from_rawfunction. 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.
Fdis passed by reference when it's an argument in host code.Fdno longer needs to implementCopyorClone.- File descriptors within structs --
types::SubscriptionU::FdReadandtypes::SubscriptionU::FdWritestill need to be stored asu32; it can be converted to anFdby calling theunsafefrom_rawIn Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new
TypePassedBykind inwitx?
sunfishcode closed without merge PR #1375.
Last updated: Dec 06 2025 at 06:05 UTC