Stream: git-wasmtime

Topic: wasmtime / PR #1375 Pass `Fd` by reference


view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2020 at 22:39):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 20 2020 at 22:41):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 16:21):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 16:24):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 16:29):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 16:36):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 17:09):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 23 2020 at 17:51):

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 the FdPool, by taking advantage of the new EntryTable.

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.

In Wiggle, would it be better to special-case Handle to implement pass-by-reference behavior, or add a new TypePassedBy kind in witx?

view this post on Zulip Wasmtime GitHub notifications bot (May 13 2020 at 23:26):

sunfishcode closed without merge PR #1375.


Last updated: Dec 23 2024 at 12:05 UTC