🕳 Add virtual pipes to wasi-common
This introduces `Handle` implementations for readable and writable pipes, backed by arbitrary `Read` and `Write` types, respectively. In particular, this allows for easily providing, capturing, or redirecting WASI stdio without having to resort to OS-provided file descriptors. The implementation is based heavily on `wasi_common::virtfs::InMemoryFile`, but without inapplicable operations like `seek` or `allocate`. Note that these types are not 1:1 replacements for real pipes, because they do not support `poll_oneoff`.
This commit is contained in:
@@ -32,7 +32,7 @@ mod poll;
|
||||
mod sandboxed_tty_writer;
|
||||
pub mod snapshots;
|
||||
mod sys;
|
||||
mod virtfs;
|
||||
pub mod virtfs;
|
||||
pub mod wasi;
|
||||
|
||||
pub use ctx::{WasiCtx, WasiCtxBuilder, WasiCtxBuilderError};
|
||||
|
||||
Reference in New Issue
Block a user