Hi list,

I've been working on a Cap'n Proto implementation for the Zig language.
This implementation is unusual in that it leverages the language's
compile-time code execution capabilities to read a schema file - written
in Cap'n Proto's schema language, no separate compilation step required
- and then make the interfaces defined in the schema available to
library users.

I wasn't 100% sure if this was going to work, but I now have a parser,
struct layouting algorithm and some rudimentary experiments with a
type-safe struct read/write API that compiles down to code that *should*
be just as efficient as if a code generation step was involved.

Sadly, now that I've convinced myself that this might actually work out,
I've lost the motivation to do the remaining 80% of the work and turn it
into a usable library. So instead I'm publishing the unfinished product
with the hope that it might inspire or prove useful to someone. And, who
knows, maybe I'll continue to work on it some time in the future.

The code is at https://code.blicky.net/yorhel/capnzig

Documentation's kind of lacking - the code is commented here and there,
but making sense of everything may take effort. I'll be around to answer
questions if there are any.

Here's hoping we'll have a mature Cap'n Proto implementation for Zig at
some point, regardless of which code generation strategy is taken.

Yorhel.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/Y7/3v1VZfkFIFO5s%40gmai021.

Reply via email to