kubkon opened PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1516 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
kubkon edited PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
kubkon edited PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon updated PR #1600 from vfs-stdio
to master
:
This PR builds upon #1561 and should only be merged after #1561 lands in upstream.
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon edited PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon requested pchickey for a review on PR #1600.
kubkon requested pchickey and sunfishcode for a review on PR #1600.
kubkon updated PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
peterhuene submitted PR Review.
peterhuene created PR Review Comment:
The C API currently only accepts paths to files for stdin/stdout/stderr, so these should probably be
OsFile::try_from
.
kubkon updated PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939 (hopefully!)
kubkon edited PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939, #1636, #1735
peterhuene submitted PR Review.
peterhuene submitted PR Review.
peterhuene created PR Review Comment:
Should this function be merged with
create_preview1_instance
likecreate_snapshot0_instance
is implemented?
kubkon updated PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939, #1636, #1735
kubkon updated PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939, #1636, #1735
kubkon updated PR #1600 from vfs-stdio
to master
:
There have been requests to allow more than just raw OS handles to act as stdio in
wasi-common
(see #939). This PR makes this possible by loosening the requirement of theWasiCtxBuilder
to accept any typeT: Handle + 'static
to act as any of the stdio handles.A couple words about correctness of this approach. Currently, since we only have a single
Handle
super-trait to represent all possible WASI handle types (files, dirs, stdio, pipes, virtual, etc.), it is possible to pass in any type to act as stdio which can be wrong. However, I envision this being a problem only in the near(est) future until we work out how to splitHandle
into several traits (FYI @sunfishcode and I have already started figuring this out), each representing a different type of WASI resource. In this particular case, this would be a resource which would implement the interface required for a handle to act as a stdio (with appropriate rights, etc.).@jeffcharles @pchickey The minimum this PR still needs is an audit of this approach for the time being (whether it's OK to go with it given the potential correctness problems I've outlined above). Docs around different now-public types are also a must if we decide to go with it. Oh, and I haven't really got to testing this approach, i.e., whether this is actually sufficient of a change to facilitate the requirements of #939. Any comments and feedback is thus most welcome!
Closes #939, #1636, #1735
pchickey submitted PR Review.
kubkon merged PR #1600.
Last updated: Dec 23 2024 at 12:05 UTC