Zig Implementation

100 views
Skip to first unread message

Kai Jellinghaus

unread,
Oct 4, 2023, 4:58:03 AM10/4/23
to Cap'n Proto
Hey everyone,

I'm a big fan of Cap'n Proto and have been enjoying zig recently. It would be really useful to be able to combine the two, but so far it seems there's not been any successful attempts, despite them being such a good fit!
I'm yet to start trying this, but trying to figure out what the best way to go about this is right now.
I want to make it all in zig, so I suppose I'd have to write some manual definitions to bootstrap a plugin. Beyond that it seems fairly straightforward.
Is there a (minimal) version of the C++ library compatible with C? In that case I could simply use that directly, without any complicated linking steps.

-Kai

David MALLOWS

unread,
Oct 4, 2023, 6:41:42 AM10/4/23
to Kai Jellinghaus, Cap'n Proto
Le mer. 4 oct. 2023 à 10:58, Kai Jellinghaus
<kai.jell...@gmail.com> a écrit :
> I'm a big fan of Cap'n Proto and have been enjoying zig recently. It would be really useful to be able to combine the two, but so far it seems there's not been any successful attempts, despite them being such a good fit!

Hey all,

I started work on a pure zig implementation late July. I believe that
it may soon get to the point that it may start to be useful to
somebody other than me. So far it’s able to read enough of the
CodeGeneratorRequest for code generation of a reader of itself. I have
been making changes to the way schemas are generated and began
refactoring the code generator, and I am hoping to complete this by
the weekend.

If anyone wants to take a look or contribute, it should be public at
https://github.com/dpwm/zig-capnp – but be warned: it’s undergoing
heavy changes at the moment! I plan to post an update to the list when
it starts to look useful for serialization.

David
Reply all
Reply to author
Forward
0 new messages