Commit Graph

3 Commits

Author SHA1 Message Date
Pat Hickey
cf303d91fc wasi-common virtfs pipe: convert to be Send and Sync 2020-07-01 14:51:30 -07:00
Adam C. Foltzer
fddd94d23f address review comments 2020-07-01 09:46:38 -07:00
Adam C. Foltzer
5a96b0deaa 🕳 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`.
2020-06-30 10:44:42 -07:00