News for hackers. Stuff that matters.
Re:IPC in Rust – A Ping Pong Comparison by dvt on Tuesday June 18, 2024 @08:24PM (#40723470)
IPC having a lot of "overhead" is nonsense (other than, like, managing a mutex or semaphore). I've used many header-only IPC libraries (this one[1] worked great on Windows/MacOS). It's way easier to get a hang of instead of jerry-rigging TCP or UDP to do IPC (yuck).

[1] https://github.com/jarikomppa/ipc

Re:IPC in Rust – A Ping Pong Comparison by DawsonBruce on Tuesday June 18, 2024 @09:57PM (#40724047)
Thanks for sharing this. I recently built something similar for a closed source project and am curious how I didn’t run across this library in my research.

Briefly: my implementation uses a templated RAII-style wrapper that persists objects in shared memory for as long as an instance of that object remains in scope. Once the last object goes out of scope, shared memory is freed. It works great so far. I’ll probably reference this library to compare implementations and see what I can learn. Thanks again.

Re:IPC in Rust – A Ping Pong Comparison by dvt on Tuesday June 18, 2024 @10:07PM (#40724090)
If you need something more powerful, Boost.Interprocess is also a thing[1]. I used it like 10 years ago and seemed to work well. Looking at the docs, it even has a RAII-ish thing called `boost::interprocess::remove_shared_memory_on_destroy`.

[1] https://www.boost.org/doc/libs/1_85_0/doc/html/interprocess....