Crate shmem_ipc

source ·
Expand description

Communication between processes using shared memory.

This crate uses memfd sealing to ensure safety between untrusted processes, and therefore, it works only on Linux.

You might want to start in the sharedring module, which sets up a lock-free ringbuffer between untrusted processes. Another useful function is mem::write_once for a scenario where you write data once and make it available for reading afterwards. The mem and ringbuf contain building blocks that might be useful in other use cases.

There is also a client/server example in the examples directory that can help you get started. Enjoy!


Functions for creating memory maps from memfds.
This is a fast ringbuffer that tries to avoid memory copies as much as possible. There can be one producer and one consumer, but they can be in different threads i e, they are Send but not Clone.
Creates shared memory ring buffers to be used between untrusted processes.


Enumeration of errors possible in this library