I know the website says to post here before writing code, but I should confess, late as it is, that I've also worked on a C# implementation. It originally started as a personal experiment (to use the Span<T> type with Marc's implementation), but it eventually turned into writing my own implementation[1]. However, excited as I am about Cap'n Proto, I haven't had a problem to apply it to yet, so my implementation went dormant, mostly untested. I didn't think I had much reason to bring it up, at least until I had proved it out with some application, but after seeing this thread, it occurred to me if others are interested in a C# implementation, perhaps this can help build up some kind of momentum. At the very least, I'd be happy to address issues and suggestions anyone brings to my project.
In theory, serialization and a capnp compile plugin should be mostly working, save for missing support for some edge cases (primitive lists upgraded into a struct list). About the only thing I've actually tested the code can do is compile the schema.capnp schema file, and writing and copying some small messages (while I attempting to implement the RPC layer, but that is much less further along). I consider the implementation's main differentiation is use of pointer arithmetic and reinterpretation with C# 7 "ref returns" (I believe called "managed pointers"), from either managed memory (without pinning) or native memory, and the avoidance of virtual calls (I believe enables the freedom for the JIT compiler to inline calls) within the read/write accessors. This is my first foray into participating in an open source project as public as this one; I hope to get along with everyone well. Thanks, --Alec [1]: https://github.com/aemmett/capnpnet On Sun, Jun 18, 2017 at 1:11 PM, Kenton Varda <[email protected]> wrote: > FWIW, another option for anyone trying to get C# supported may be to > transliterate from the Java implementation, which (I believe) is fairly > complete (for serialization, at least), even supporting generics. > > -Kenton > > On Sun, Jun 18, 2017 at 1:07 AM, Marc Gravell <[email protected]> > wrote: > >> Hi, yes, that pretty much represents things. I keep trying to mark that >> repo private, but folks keep asking me to make it available for them to >> clone! >> >> Status: read works fine; write is hit and miss with some space allocation >> APIs missing / untested. My primary need when writing it was *consuming* >> data, hence why it is that way around. Similarly, codegen is in an odd >> state that "kinda depends ish but not quite" on the main tools, and is ugly >> etc. It certainly hasn't been updated to reflect any upstream tool changes >> over the last... however long. >> >> If anyone can do anything useful with the code, that's great. But I >> simply don't have the time to do what is needed with it - I'm fully >> consumed on other projects. >> >> However, I suspect that the best approach may be to salt the field and >> start anew. >> >> Marc >> >> >> On 15 Jun 2017 12:35 a.m., "'Kenton Varda' via Cap'n Proto" < >> [email protected]> wrote: >> >> My understanding is that the repo was never production-ready and is no >> longer being actively developed. :( >> >> I think Marc is looking for a new maintainer. >> >> -Kenton >> >> On Wed, Jun 14, 2017 at 4:02 PM, Emil Christopher Solli Melar < >> [email protected]> wrote: >> >>> Hi! I am looking into this and comparing capn'proto to Flatbuffers, >>> Protobuf, MsgPack. >>> >>> But I need C# support as well. https://github.com/Stack >>> Exchange/capnproto-net >>> >>> It's 3 years with no activity. Will it work today, or is it in dire need >>> of an overhaul? >>> >>> Thanks! >>> >>> -- >>> 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 [email protected]. >>> Visit this group at https://groups.google.com/group/capnproto. >>> >> >> -- >> 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 [email protected]. >> Visit this group at https://groups.google.com/group/capnproto. >> >> >> -- >> 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 [email protected]. >> Visit this group at https://groups.google.com/group/capnproto. >> > > -- > 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 [email protected]. > Visit this group at https://groups.google.com/group/capnproto. > -- 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 [email protected]. Visit this group at https://groups.google.com/group/capnproto.
