Feature Comparison

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.

Feature matrix

FeaturerkyvCap'n ProtoFlatBuffers
Open type systemyesnono
Scalarsyesnoyes
Tablesno*yesyes
Schema evolutionno*yesyes
Zero-copyyesyesyes
Random-access readsyesyesyes
Validationupfront*on-demandyes
Reflectionno*yesyes
Object orderbottom-upeitherbottom-up
Schema languagederivecustomcustom
Usable as mutable stateyeslimitedlimited
Padding takes space on wire?yes*optionalno
Unset fields take space on wire?yesyesno
Pointers take space on wire?yesyesyes
Cross-languagenoyesyes
Hash maps and B-treesyesnono
Shared pointersyesnono

* rkyv's open type system allows extension types that provide these capabilities

Open type system

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.

Unsized types

Even though they're part of the main library, unsized types are built on top of the core serialization functionality. Types like Box and Rc/Arc that can hold unsized types are entry points for unsized types into the sized system.

Trait objects

Trait objects are further built on top of unsized types to make serializing and using trait objects easy and safe.