Ok I see, generated headers indeed include capnproto/kj headers, so Cap'n
Proto would be a public dependency of my library.
The version mismatch issue could be solved by using a CMake package, with
the right version of Cap'n Proto required in the CMake configuration file.
Based on all this, I
I would say that when you are distributing a precompiled binary copy of
your library, you should distribute the `.capnp.h` header along with it, if
you want programs using your library to be able to use that type. Those
programs will need to link against the exact version of the schema that you
It works ! Thank you for the expanded explanation, it helped a lot. I
initially though there would be a "prettier" out-of-the-box solution, but as
long as it works...
While I have you, I have a more general question. Is it common case to
distribute Cap'n'Proto genererated headers as part of a
You need your `SubscriberImpl` to hold a regular C++ pointer back to the
`MediaLibraryImpl` that created it, so that you can access its
`publishers_` set through that pointer. You can pass the pointer to
`SubscriberImpl`'s constructor.
You'll also want to make sure the pointer doesn't become a
Thank you for your quick answer!
The `Server` to `Client` "conversion" is done via the bootstrap capability,
but I need the underlying `Server` back when calling capabilities returned
by the bootstrap capability.
Here is a simplified example where I (tried) to implement your advice:
interface
Hi Théophile,
Take a look at CapabilityServerSet:
https://github.com/capnproto/capnproto/blob/6b5bcc2c6e954bc6e167ac581eb628e5a462a469/c++/src/capnp/capability.h#L607-L633
When you convert your `Server` object to a `Client`, you need to do it
using a CapabilityServerSet. Later, you can use the
I'm not sure I'm usign the right terminology in my question, but I hope you
will understand my problem with the following example.
I'm developing a media library where the user can play/pause/stop different
kinds of "pipelines" (source ~ camera, filter ~ processing, sink ~
display). Depending