c-capnproto maintenance

226 views
Skip to first unread message

li...@stask.net

unread,
Aug 4, 2015, 4:43:20 PM8/4/15
to Cap'n Proto
Hi,

I've been doing a little work to bring James McKaskill's c-capnproto (https://github.com/jmckaskill/c-capnproto) up to date with some more recent capn proto versions, and thought I'd post in case anybody else was interested. I'm mainly interested in the following:
  • compatibility with recent capnp tool releases (recent changes tested against v0.5.2, though not all features are completely supported at the moment - the existing build was failing code generation with v0.5.2 of the capnp tool)
  • support for resource constrained environments (lib is well setup to accommodate a variety of memory allocation strategies, but mainly supports a malloc-based implementation as its default, would like to provide some defaults for non-malloc'ing systems)
  • a little better ease of use - docs describing intended use, demonstrative examples, possibly packaging of the capnpc-c tool (with systems like homebrew on OS X, at least) to make for easier installation, etc.
At the moment, it seems like James' original repo is a bit dormant so I've been making changes in https://github.com/liamstask/c-capnproto, but would be very happy to merge any of this upstream if/when that makes sense.

Cheers,
Liam

Niek Bouman

unread,
Aug 6, 2015, 11:02:35 AM8/6/15
to Cap'n Proto
Hello Liam,

Great! I'd be interested in an up-to-date C version for the serialization layer of capnproto.
We use capnproto as the serialization layer in an experimental smart grid control platform, and C-support would be a good way for us to support constrained platforms with legacy compilers (no C++11).
As we make use of parameterized types in our schema, we rely on capnproto >=0.5, which I think is not supported by jmckaskill's version.

Thank you,
Niek Bouman

Andrew Lutomirski

unread,
Aug 6, 2015, 6:27:39 PM8/6/15
to Niek Bouman, Cap'n Proto
This thing is in a state of embarrassing stalledness, but it might be
nice to integrate:

https://github.com/amluto/nanocnp

--Andy
> --
> 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 capnproto+...@googlegroups.com.
> Visit this group at http://groups.google.com/group/capnproto.

li...@3drobotics.com

unread,
Aug 7, 2015, 2:39:01 AM8/7/15
to Cap'n Proto, niekb...@gmail.com, an...@luto.us
Niek - great :) I haven't gotten around to updating the generics functionality yet, but I agree that's one of the features that would be most important to implement in order to move towards compatibility with some of the other implementations. I'll probably be poking at that in the next couple weeks.

Andy - cool! I'll take a look. Do you have anything particular in mind in terms of integration?

Liam

Kenton Varda

unread,
Aug 7, 2015, 10:01:23 PM8/7/15
to li...@3drobotics.com, Cap'n Proto, Niek Bouman, Andrew Lutomirski
FWIW I think in C you would ignore generics, since C itself doesn't support them. Instead you'd trust the developer to use the right types -- much like how C collections normally hold void* pointers.

In any case, I'm glad someone is picking this up! Let me know if/when you want me to add your project to the list of links on the "other languages" page.

BTW, there are some disadvantages of maintaining a project as a github "fork" -- like, search doesn't work. If you can convince James to transfer ownership of the project, that might be better. (The Go implementation has a similar problem, but it's probably too late to fix there.)

-Kenton
Reply all
Reply to author
Forward
0 new messages