Yes, although I've never used capnproto, I believe the approach it takes is similar: you define your schema, it generates code to do the serialization and to handle the RPCs.
That or regular protobuf would be my go-to for this. Capnproto is faster, but idk if there are more limitations as a result.