I am working on developing a module that has to do lot of RPC with other systems implemented in C. My first preference would be gRPC but the as far I know gRPC doesn't have first class support for C.
Looking for suggestions for a high performance RPC between Rust & C. Appreciate any pointers.
I use ZeroMQ for this sort of thing. You can do strictly ordered request/reply, or interleaved request/reply (using router sockets), or fully bidirectional (using dealer sockets). Works well in C and Rust, which is what I use it for. The C bindings are excellent.
There's almost zero difference between running sockets over IPC on a local machine, or TCP on different machines. Indeed right now, I'm debugging an embedded UI by running it on a desktop machine, while it uses ZeroMQ via TCP to talk to the hardware layer and other services on an embedded device. In normal deployment it runs on the same device using IPC sockets instead. That all required one line changes for each socket, and nothing else in any other part of the code.
It doesn't give you a higher level protocol for arguments/return values though, it's up to you to decide exactly what format your messages take. I use Cap'n Proto for that, others use Protobuf or JSON.