This is a C plugin for [Cap'n Proto](http://kentonv.github.io/capnproto), an efficient protocol for sharing data and capabilities.
Find a file
2016-02-28 12:15:12 +01:00
compiler compiler: notes on updating from upstream 2015-08-04 12:04:49 -07:00
.gitignore Add beginnings of subcompiler 2013-05-07 22:54:30 -04:00
.travis.yml travis: remove sudo requirement in order to be able to build on faster container system 2015-08-04 11:11:54 -07:00
capn-list.inc remove CAPN_COMPOSITE_LIST and add capn_len 2013-09-16 16:53:33 -04:00
capn-malloc.c Partial revert "all: use unsigned types for more variables that represent length" 2016-02-28 12:15:12 +01:00
capn-stream-test.cpp Implement serialization to buffers 2014-02-20 17:13:57 -08:00
capn-stream.c Partial revert "all: use unsigned types for more variables that represent length" 2016-02-28 12:15:12 +01:00
capn-test.cpp all: use unsigned types for more variables that represent length 2015-08-04 10:44:22 -07:00
capn.c clean up of write_ptr 2013-12-10 20:34:04 -05:00
capn.h all: use unsigned types for more variables that represent length 2015-08-04 10:44:22 -07:00
LICENSE Add MIT license 2013-09-12 15:17:22 -04:00
Makefile gtest: use installed package, drop files 2016-02-28 12:08:28 +01:00
ReadMe.md readme: super brief info 2015-08-04 11:00:26 -07:00

c-capnproto

C support for Cap'n Proto, an efficient protocol for sharing data and capabilities.

Build Status

status

This is a fork of James McKaskill's great work, which has been untouched for a while, so I've been bringing it up to date with current cap'n proto progress, and doing some doc/testing work. Should the upstream fork become active again, I'd hope to merge any relevant changes back in.

usage

The compiler directory contains the C language plugin (capnpc-c) for use with the capnp tool: https://capnproto.org/capnp-tool.html.

capnp will by default search $PATH for capnpc-c - if it's on your PATH, you can generate code for your schema as follows:

$ capnp compile -o c myschema.capnp

Otherwise, you can specify the path to the c plugin:

$ capnp compile -o ./capnpc-c myschema.capnp

capnp generates a C struct that corresponds to each capn proto struct, along with read/write functions that convert to/from capn proto form.

TBD whether it will make sense in the future to provide accessor functions for struct members, rather than converting entire structs.