The Crunch Message Definition Protocol
One of the most common classes of bugs I’ve seen is acting on improperly validated data. For a long time, I wanted a message definition tool that treated validity as a first-class concern. Where semantic correctness - both per-field and across fields - was just as intrinsic as types and names. I wanted it to work in embedded environments without dynamic memory allocation. And I wanted flexibility over how the data is serialized, so I can optimize for backwards compatibility or read/write speed.
That’s why I built Crunch.
Crunch is a high-performance message definition and serialization framework written in modern C++. Today it’s usable in C++23 projects, with plans for autogenerated bindings in other languages.
This is the first post in a series on message definition protocols and Crunch’s design:
https://www.volatileint.dev/posts/crunch-intro/
Code and full Doxygen docs:
https://github.com/sam-w-yellin/crunch