Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing schemas from other crates is awkward #30

Open
dwrensha opened this issue Oct 16, 2016 · 2 comments
Open

Importing schemas from other crates is awkward #30

dwrensha opened this issue Oct 16, 2016 · 2 comments

Comments

@dwrensha
Copy link
Member

dwrensha commented Oct 16, 2016

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 .

@dwrensha
Copy link
Member Author

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.

@dwrensha
Copy link
Member Author

dwrensha commented Jun 2, 2023

This has been moved to capnproto/capnproto-rust#233

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant