mozilla/rust — pull request #4039 by brson (2012-11-26 00:37:05+00:00)
Title: Generalized pipes, sendable managed types, simple IPC

This is a module called `flatpipes`, which provides a generic type for transporting values that can be converted to bytes.

It can do several cool things:

* Send all serializable types, including managed types
* Efficiently send POD types
* Send and receive over I/O streams, including std I/O and uv network connections
* Send and receive managed types over standard pipes via serialization
* Implements the base pipe traits

The primary motivation is to create a high-level interface for communicating with a sandbox. In particular, I want to create a compiler interface that supports either in-process or out-of-process builds. Most users, including our build system, will need a sandboxed compiler to recover from LLVM assertion failures and to encapsulate thread-unsafety.

As an example, the final commit includes a test case demonstrating spawning a new process and treating it as an actor over stdio.