Have you considered just using gRPC in this case? You gain 100% language separation (no FFI) and remote client/server at the cost of a little more call overhead.
Most of the gRPC implementations force buffering of the whole response for large unary responses. They are not really written by people who care about performance. It’s dumb because the protobuf binary marshaled format is perfectly designed for server-side incremental marshaling.
Yeah! I'm using a gRPC daemon on PC and go mobile bindings on mobile.
Not OP but in same situation. Not every platform can run gRPC over localhost easily or without extra privileges.
I used to use protobuf but now I just use JSON, over stdin/stdout on desktop. It’s honestly quite good.