Skip to content

Commit

Permalink
README adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
kotauskas committed Nov 3, 2022
1 parent 2b382f7 commit fb2cd87
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 22 deletions.
31 changes: 20 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,30 @@
[![Crates.io](https://img.shields.io/crates/v/interprocess)](https://crates.io/crates/interprocess "Interprocess on Crates.io")
[![Docs.rs](https://img.shields.io/badge/documentation-docs.rs-informational)](https://docs.rs/interprocess "interprocess on Docs.rs")
[![Build Status](https://github.com/kotauskas/interprocess/workflows/Checks%20and%20tests/badge.svg)](https://github.com/kotauskas/interprocess/actions "GitHub Actions page for Interprocess")
![maintenance-status](https://img.shields.io/badge/maintenance-actively%20developed-brightgreen)

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
- Cross-platform interprocess communication primitives:
- **Unnamed pipes** – anonymous file-like objects for communicating privately in one direction, most commonly used to communicate between a child process and its parent
- **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
- POSIX-specific interprocess communication primitives:
- **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
- **POSIX signals** – used to receive short urgent messages from the OS and other programs, as well as sending those messages *(practical usage, other than for compatibility reasons, is strongly discouraged)*
- Windows-specific interprocess communication primitives:
- **Named pipes** – closely resembles Unix domain sockets, uses a separate namespace instead of on-drive paths
- **C signals** – like POSIX signals, but with less signal types and a smaller API *(practical usage, other than for compatibility reasons, is strongly discouraged)*
- **Async support** – efficient wrapper around local sockets, Windows named pipes and Ud-sockets for high-performance parallelism, currently only supports the Tokio runtime
### 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.
Expand Down
1 change: 1 addition & 0 deletions README.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
[![Crates.io](https://img.shields.io/crates/v/interprocess)](https://crates.io/crates/interprocess "Interprocess on Crates.io")
[![Docs.rs](https://img.shields.io/badge/documentation-docs.rs-informational)](https://docs.rs/interprocess "interprocess on Docs.rs")
[![Build Status](https://github.com/kotauskas/interprocess/workflows/Checks%20and%20tests/badge.svg)](https://github.com/kotauskas/interprocess/actions "GitHub Actions page for Interprocess")
![maintenance-status](https://img.shields.io/badge/maintenance-actively%20developed-brightgreen)

{{readme}}
30 changes: 19 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
//! 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
//! - Cross-platform interprocess communication primitives:
//! - **Unnamed pipes** – anonymous file-like objects for communicating privately in one direction, most commonly used to communicate between a child process and its parent
//! - **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
//! - POSIX-specific interprocess communication primitives:
//! - **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
//! - **POSIX signals** – used to receive short urgent messages from the OS and other programs, as well as sending those messages *(practical usage, other than for compatibility reasons, is strongly discouraged)*
//! - Windows-specific interprocess communication primitives:
//! - **Named pipes** – closely resembles Unix domain sockets, uses a separate namespace instead of on-drive paths
//! - **C signals** – like POSIX signals, but with less signal types and a smaller API *(practical usage, other than for compatibility reasons, is strongly discouraged)*
//! - **Async support** – efficient wrapper around local sockets, Windows named pipes and Ud-sockets for high-performance parallelism, currently only supports the Tokio runtime
//! ## 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.
Expand Down

0 comments on commit fb2cd87

Please sign in to comment.