Cap'n Proto test messages

Skip to first unread message

Brian Olsen

Jul 18, 2021, 10:47:01 AM7/18/21
to Cap'n Proto
A while back I played around with making my own implementation of Cap'n Proto in Rust and for that I really wanted a good test suite that covers corner cases. And so I started building that.

Because I thought that good test data might also be relevant to other implementations I tried making a setup that would be easily usable by other implementations so that you can compare your implementation to the reference C++ one.
It consists of schemas and messages as well as JSON representation of those messages as the capnp tool sees them. The idea is that most languages have some JSON library that you can use to read the JSON messages and you can then compare that to how your implementation reads the binary message.

I would love you hear your input.

Kenton Varda

Jul 21, 2021, 3:03:12 PM7/21/21
to Brian Olsen, Cap'n Proto
Cool stuff!

The C++ implementation has test.capnp that should cover everything, but is pretty messy, having evolved slowly together with the C++ implementation. Definitely nice to have a separate test repository that is clean and really meant to be consumed by multiple implementations.


You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages