Consider using bin_prot of JaneStreet.
Advantages are:
It's included in Core, so we will avoid YoJson/Atdgen dependencies (especially combined with #5 (closed))
It's fairly fast, according to the documentation:
It is extremely efficient, typically supporting type-safe marshalling and unmarshalling of even highly structured values at speeds sufficient to saturate a gigabit connection.