#ipc #shared-memory #pipe #unix-domain-socket

interprocess-docfix

Interprocess communication toolkit. Docs fixed.

2 stable releases

1.2.2 Jul 5, 2023
1.2.1 Jun 27, 2023

#3 in #mkfifo

Download history 2067/week @ 2023-11-02 1877/week @ 2023-11-09 2163/week @ 2023-11-16 1801/week @ 2023-11-23 1990/week @ 2023-11-30 1964/week @ 2023-12-07 1731/week @ 2023-12-14 1268/week @ 2023-12-21 1917/week @ 2023-12-28 2779/week @ 2024-01-04 1876/week @ 2024-01-11 2063/week @ 2024-01-18 2116/week @ 2024-01-25 1787/week @ 2024-02-01 1488/week @ 2024-02-08 1410/week @ 2024-02-15

7,092 downloads per month
Used in 10 crates (2 directly)

MIT/Apache

455KB
8K SLoC

Interprocess

Crates.io Docs.rs Build Status maintenance-status

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.

Features

Interprocess communication primitives

interprocess provides both OS-specific interfaces for IPC and cross-platform abstractions for them.

Cross-platform IPC APIs

  • 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

Platform-specific, but present on both Unix-like systems and Windows

  • 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)

Unix-only

  • 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

Windows-only

  • Named pipes – closely resembles Unix domain sockets, uses a separate namespace instead of on-drive paths

Asynchronous I/O

Currently, only Tokio for local sockets, Unix domain sockets and Windows named pipes is supported. Support for async-std is planned.

Feature gates

  • 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 tokio because of Cargo limitations.
  • nonblocking, on by default – deprecated and will be removed, do not use.

License

This crate, along with all community contributions made to it, is dual-licensed under the terms of either the MIT license or the Apache 2.0 license.

Dependencies

~0–10MB
~79K SLoC