🕳 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:
@@ -11,6 +11,8 @@ use std::io::SeekFrom;
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::rc::Rc;
|
||||
|
||||
pub mod pipe;
|
||||
|
||||
/// An entry in a virtual filesystem
|
||||
pub enum VirtualDirEntry {
|
||||
/// The contents of a child directory
|
||||
|
||||
Reference in New Issue
Block a user