After nearly 2.5 years since its previous release, data interchange format and RPC system Cap'n Proto reached version 0.6, adding Windows support, security hardening, and more.
According to Cap'n Proto author Kenton Varda, the apparent release delay was not related to a lack of development, which on the contrary went on all the time, but to the low priority that a stable port to Windows had for its parent project, Sandstorm.io. With Microsoft compilers catching up on modern C++ support, it has become easier to do the port, which includes serialization, dynamic API, schema parser, async I/O framework (using I/O completion ports), RPC, and tools. Additionally, the Cap'n Proto team has set up continuous integration, which should also help the Windows port remain healthy.
Besides full support on Windows, the last Cap' Proto version includes a few implementation changes to make it more secure against possible vulnerabilities. Those include improved pointer validation to detect integer overflow at compile time and more exhaustive tests.
Two useful new additions to Cap'n Proto ecosystem that version 0.6 brings are:
libcapnp-json
, a bidirectional converter between JSON and Cap'n Proto that aims to make it easier to integrate a JSON-based front-end with a Cap'n Proto-based back-end.libkj-http
, a minimalist HTTP library based on async I/O and that is still very much a work in progress.
Cap'n Proto is a data interchange format that aims to outperform popular formats such as JSON or Protocol Buffers by removing the need for encoding and decoding messages in memory. This is achieved by storing the data in binary form, just like a compiler would do, but in a platform-independent way. Cap'n Proto creator Kenton Varda was the author of Protocol Buffers during his time at Google:
Cap’n Proto is the result of years of experience working on Protobufs, listening to user feedback, and thinking about how things could be done better.
Cap'n Proto also includes provisions to help ensure that backwards-compatibility is guaranteed when new fields are added to the format. Other key features of Cap'n Proto includea the ability to incrementally process a message, since outer objects appear entirely before inner objects; random access to any field even before the message has been received in its entirety; and the small size of both generated code and the runtime library.