kotauskas / interprocess

Multifunctional cross-platform interprocess communication toolkit for Rust.
Apache License 2.0
361 stars 43 forks source link

Crates.io Docs.rs Build status maintenance-status Rust version: 1.75+

Interprocess communication toolkit for Rust programs that aims to expose as many platform-specific features as possible while maintaining a uniform interface for all platforms and encouraging portable, correct code.

Interprocess communication primitives

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

Cross-platform IPC APIs
Platform-specific, but present on both Unix-like systems and Windows
Unix-only
Windows-only

Asynchronous I/O

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

Platform support

Interprocess supports Windows and all generic Unix-like systems. Additionally, platform-specific extensions are supported on select systems. The policy with those extensions is to put them behind #[cfg] gates and only expose on the supporting platforms, producing compile errors instead of runtime errors on platforms that have no support for those features.

Four levels of support (not called tiers to prevent confusion with Rust target tiers, since those work completely differently) are provided by Interprocess. It would be a breaking change for a platform to be demoted, although promotions quite obviously can happen as minor or patch releases.

Explicit support

OSes at this level: Windows, Linux, macOS

Explicit support without CI

OSes at this level: FreeBSD

Support by association

OSes at this level: Dragonfly BSD, OpenBSD, NetBSD, Redox, Android, Fuchsia, iOS, tvOS, watchOS

Assumed support

OSes at this level: POSIX-conformant #[cfg(unix)] systems not listed above for which the libc crate compiles

Feature gates

License

This crate, along with all community contributions made to it, is dual-licensed under MIT and Apache 2.0.