This is a best-effort feaure comparison between rkyv, FlatBuffers, and Cap'n Proto. This is by no means completely comprehensive, and pull requests that improve this are welcomed.
|Open type system||yes||no||no|
|Usable as mutable state||yes||no||no|
|Padding takes space on wire?||yes*||optional||no|
|Unset fields take space on wire?||yes||yes||no|
|Pointers take space on wire?||yes||yes||yes|
|Hash maps and B-trees||yes||no||no|
* rkyv's open type system allows extension types that provide these capabilities
One of rkyv's primary features is that its type system is open. This means that users can write custom types and control their properties very finely. You can think of rkyv as a solid foundation to build many other features on top of. In fact, the open type system is already a fundamental part of how rkyv works.
Even though they're part of the main library, unsized types are built on top of the core
serialization functionality. Types like
Rc/Arc that can hold unsized types are entry
points for unsized types into the sized system.
Trait objects are further built on top of unsized types to make serializing and using trait objects easy and safe.