When you run `capnp compile -orust`, the `capnp` tool will attempt to execute a binary `capnpc-rust` from your $PATH. This binary seems to be provided by the capnpc crate, but declaring a dependency on the crate probably does not automatically install it into your $PATH. You can either install the binary into $PATH, or you can provide the binary location explicitly like:
capnp compile -o/path/to/capnpc-rust src/schema/user.capnp I don't think there's a mailing list specifically for the Rust implementation but you could try filing issues on the github repo. -Kenton On Thu, Aug 31, 2023 at 7:48 AM Tanguille Grootaert < [email protected]> wrote: > That can't be the issue since my depedencies are containing the same ones > as the examples in that repo, where `capnp` and `capnpc` are a part of. The > code compiles so the dependencies are valid. Only thing I can think about > is that the apt repo has outdated binaries for the Cap'n Proto compiler > causing it to use the old naming. > > Is there a another place I could pose this question, maybe rust specific > by any chance? > > Op donderdag 31 augustus 2023 om 14:30:42 UTC+2 schreef > [email protected]: > >> You need to install the Rust capnp plugin. I'm not very familiar with >> Rust but it looks like this is provided by the crate called `capnpc`. >> >> https://github.com/capnproto/capnproto-rust >> https://docs.rs/capnpc/latest/capnpc/ >> >> -Kenton >> >> On Thu, Aug 31, 2023 at 6:55 AM Tanguille Grootaert < >> [email protected]> wrote: >> >>> Thanks for the explanation Kenton. Cool to see you're still so involved, >>> it's an honor to get an answer from you. >>> >>> I am now trying to implement it in a little testproject with rust. >>> However I can't seem to figure out how to install `capnpc-rust`. I >>> installed both `capnproto` and `libcapnp-dev` via apt. >>> If I do the command `capnp compile -orust src/schema/user.capnp` it >>> outputs >>> `rust: no such plugin (executable should be 'capnpc-rust') >>> rust: plugin failed: exit code 1` >>> >>> This confuses me because other then a repo that has now been integrated >>> in the main rust repo I can't find anything about this. What am I missing? >>> >>> >>> Op woensdag 30 augustus 2023 om 16:43:09 UTC+2 schreef >>> [email protected]: >>> >>>> Hi Tanguille, >>>> >>>> Cap'n Proto is agnostic to the underlying byte transport. It can layer >>>> on top of any byte stream or datagram stream. In terms of the C++ >>>> implementation, you can write a custom implementation of the >>>> capnp::MessageStream interface in terms of any transport you'd like. For >>>> example, you could use Cap'n Proto over WebRTC. It's up to you to establish >>>> the byte-oriented or datagram-oriented connection first, then Cap'n Proto >>>> helps you interact with the peer across that connection. >>>> >>>> NAT traversal is the responsibility of the underlying transport, so is >>>> outside the scope of Cap'n Proto itself. >>>> >>>> -Kenton >>>> >>>> On Wed, Aug 30, 2023 at 8:36 AM Tanguille Grootaert < >>>> [email protected]> wrote: >>>> >>>>> I discovered that WebRTC is actually some kind of stream multiplexer. >>>>> If I search for that in the context of Cap'n proto the only reference I >>>>> can >>>>> find is in the release notes of the 0.8 release ( >>>>> https://capnproto.org/news/). There it is stated that it can't be >>>>> considered stable yet, this is now 3 years ago but I can't find more >>>>> information about this topic. Can anyone point me to a good source or an >>>>> example implementation? >>>>> >>>>> Op woensdag 30 augustus 2023 om 12:27:54 UTC+2 schreef Tanguille >>>>> Grootaert: >>>>> >>>>>> Hey all,ᅠ >>>>>> >>>>>> I wanna build a p2p network in Rust. After some research I discovered >>>>>> I wanna work with libp2p, Cap'n Proto, ... In the docs of libp2p I read >>>>>> that WebRTC has NAT-traversal built in which I need. Since I want to use >>>>>> Cap'n Proto I don't wanna use this but use the RPC-protocol of Cap'n >>>>>> Proto. >>>>>> Does that have support for NAT-traversal? I can't find anything about >>>>>> it.ᅠ >>>>>> >>>>>> If you have a better idea on how to approach this, that's ofcourse >>>>>> always welcome. 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]. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/capnproto/88ce497f-d49a-4b97-a130-b787e6d9d0cen%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/capnproto/88ce497f-d49a-4b97-a130-b787e6d9d0cen%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- >>> 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]. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/capnproto/cd024e30-eb7d-4ca6-9c4d-9f7bf5a01da0n%40googlegroups.com >>> <https://groups.google.com/d/msgid/capnproto/cd024e30-eb7d-4ca6-9c4d-9f7bf5a01da0n%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> -- > 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]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/capnproto/9ebe0b3f-acec-4765-8cbd-b4cbb57a3a25n%40googlegroups.com > <https://groups.google.com/d/msgid/capnproto/9ebe0b3f-acec-4765-8cbd-b4cbb57a3a25n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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]. To view this discussion on the web visit https://groups.google.com/d/msgid/capnproto/CAJouXQnin7JcgMSk2g70gZvD0FLzd_cWtybU78MZM90GOi5zTA%40mail.gmail.com.
