frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Rtipc – real-time, zero-copy IPC for Linux

https://github.com/mausys/rtipc
1•mausys•2h ago
I built a small IPC library for Linux aimed at real-time and low-latency data exchange between processes.

At its core is a zero-copy, wait-free, single-producer / single-consumer circular message queue living in shared memory. The design avoids locks and minimizes synchronization overhead, making it suitable for real-time or near-real-time workloads.

Key features: - Zero-copy message passing via shared memory - Wait-free SPSC queue (no locks, no blocking in the fast path) - force_push mode: when the queue is full, the oldest message that hasn’t been consumed yet is dropped to make room for new data (useful when freshness > completeness, e.g. sensor streams) - Uses optional eventfds for efficient notifications - Small, dependency-free C implementation (a few thousand lines of code)

This is not meant to replace general-purpose IPC systems like D-Bus. Instead, it’s designed to complement them for high-frequency or real-time data paths, while something like D-Bus handles control and configuration.

The library includes a lightweight handshake protocol over Unix domain sockets to exchange shared memory file descriptors, eventfds, and channel configuration.

If you prefer, you can also use an external IPC mechanism just for the handshake phase.

Ecosystem:

There’s also a pure Rust implementation of the same protocol and queue design: https://github.com/mausys/rtipc-rust

And an example in Rust of using zbus and Tokio to perform the handshake over D-Bus while using this library for the real-time data channel: https://github.com/mausys/rtipc-zbus