Re:How Turborepo is porting from Go to Rust
by iamcalledrob on Friday July 21, 2023 @12:21PM
(#36815737)
I'm using protobuf for exactly this use-case, but I'd say that it's clearly designed as a network format first, and makes trade-offs as such.
For example, it prioritizes backwards and forwards compatibility -- which is not a concern for IPC where you control both ends. So no real optional or required fields. Comparing structures (Go) is awkward and uses reflection. Structs embed a mutex and preserve bytes for unknown fields etc...
MessagePack seems to make a better set of tradeoffs by comparison.
For example, it prioritizes backwards and forwards compatibility -- which is not a concern for IPC where you control both ends. So no real optional or required fields. Comparing structures (Go) is awkward and uses reflection. Structs embed a mutex and preserve bytes for unknown fields etc...
MessagePack seems to make a better set of tradeoffs by comparison.