To be honest, there is no good silver bullet solution. I've come across that problem too once and in the end I decided to just simplify my program. But my journey takes me to cap'n proto which IMHO is very ideal but it rarely has updates and the ecosystem around it is lacking. If you need to support many languages, then protobuf is the best. If you didn't mind it being open source, there is ZeroC ICE (mumble use this intensively). I pray that one day there is something like cap'n proto but also works for an embedded system.
Edit: Forgot to remind you that this is meta for programming.dev. You should check out other communities to ask this question. Mod may remove this.