Interprocess communication toolkit for Rust programs. The crate aims to expose as many platform-specific features as possible while maintaining a uniform interface for all platforms.
interprocess provides both OS-specific interfaces for IPC and cross-platform abstractions for them.
- Local sockets – similar to TCP sockets, but use filesystem or namespaced paths instead of ports on
localhost, depending on the OS, bypassing the network stack entirely; implemented using named pipes on Windows and Unix domain sockets on Unix
- Unnamed pipes – anonymous file-like objects for communicating privately in one direction, most commonly used to communicate between a child process and its parent
- Signals – C signals on Windows, POSIX signals on Unix-like OSes (deprecated)
- FIFO files – special type of file which is similar to unnamed pipes but exists on the filesystem, often referred to as “named pipes” but completely different from Windows named pipes
- Unix domain sockets – a type of socket which is built around the standard networking APIs but uses filesystem paths instead of ports on
localhost, optionally using a spearate namespace on Linux akin to Windows named pipes
- Named pipes – closely resembles Unix domain sockets, uses a separate namespace instead of on-drive paths
Currently, only Tokio for local sockets, Unix domain sockets and Windows named pipes is supported. Support for
async-std is planned.
signals, on by default – enables support for POSIX signals and C signals. Pulls in additional dependencies.
tokio_support, off by default – enables support for Tokio-powered efficient asynchronous IPC. Cannot simply be named
tokiobecause of Cargo limitations.
nonblocking, on by default – deprecated and will be removed, do not use.