Hi Kenton,
you're totally right - the documentation is still work in progress. A good starting point might be the test suite which is integrated inside the VS solution. It will give you an impression on how to use the framework. And at least the vast majority of all public classes, interfaces and methods is documented. When I find the time, I also intend to provide nuget + vcpkg deployments.
The compiler backend is just an executable. After deploying it out of its VS solution, you will be able to use it together with capnpc.
Nice things to mention: I found the explanations on
capnproto.org and also the comments inside the schema files extremely helpful
IMO, .NET async concepts (especially Task<T> and the await operator) play very well with the Cap'n Proto mindset. I even find the resulting .NET APIs a bit more fluent compared to the C++ API. For passing method parameter types of RPC interfaces, I use domain classes. I.e. the object does not map directly to the underlying message. This provides more convencience but comes at the price of non-zero serialization overhead (not infinitely faster anymore, sorry for that). It was even possible to implement promise pipelining with .NET extension methods, mapping a Task<T> to T (where T is a capability interface, look at the "Impatient" class). Tail calls cannot be made explicitly, but the underlying runtime tries its best to infer them automatically: when a skeleton invocation returns a Task<T> which is known to be a question to the same party, we can interpret that question as a counterquestion.
Embargos were really hard, and I still have some doubts that I understood them deeply enough. Personally, I'm wondering whether it's really worth the runtime data structure management overhead of promise pipelining + embargos instead of ... well, just waiting until that thing resolves / everything returned.
So far, it is worrying me that one test case ("TailCallClient") is currently failing. This test case is a ported version of the original Cap'n Proto "TailCall" test, with the client being the original C++ implementation, and the server being the .NET Core implementation. It's the C++ side which seems to get a call sequence in wrong order, but I can't figure out what the .NET side is doing wrong. Yes, there is am embargo involved, send from C++ to .NET. But the disordering seems to happen before the .NET side even receives it.
Regards
Christian