capnpc-rust
capnpc-rust copied to clipboard
Importing schemas from other crates is awkward
If I write a sandstorm app using the low level cap'n proto API and I want to write some of my own schemas that refer to the sandstorm types, it currently does't work to just use https://crates.io/crates/sandstorm , because capnpc-rust has no awareness of cross-crate boundaries. Probably we need to use an annotation similar to https://github.com/sandstorm-io/capnproto/blob/2b8cde72a49492d26ac9809b490959b590a3cc7f/c%2B%2B/src/capnp/c%2B%2B.capnp#L25 .
rust.capnp might look something like this:
@0xe7d39f87b162dac5;
annotation filename(file): Text;
annotation crate(file): Text;
annotation module(file): Text;
Building hooks for such annotations into capnpc-rust would also solve #5.
This has been moved to https://github.com/capnproto/capnproto-rust/issues/233