-
Notifications
You must be signed in to change notification settings - Fork 222
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
c++.capnp compiles to unusable module name #478
Comments
Does #412 help? |
I made an external crate called When I try to compile I still get errors in the generated code referencing |
I'm assuming the c++.capnp schema file is this one from the main capnproto repo: https://github.com/capnproto/capnproto/blob/v2/c%2B%2B/src/capnp/c%2B%2B.capnp Is there a reason that you need to generate Rust code for it at all? Note that the capnproto-rust addressbook example refers to c++.capnp but does not generate Rust code for it, and this works without a problem. |
There is also an Enum added to that file to create a new type of annotation. The compiler fails on the enum specifically. The annotation created from that enum is used widely in the other schemas that I need to use directly. |
Ah, and unfortunately Rust raw identifiers don't support the '+' character either. Some options:
|
I am talking to the team that owns the schema files to see if we can change the name. If we are the only ones running into this and the change doesn't cause big problems (which is a risk) then option 4 seems like the simplest solution. |
I have a c++.capnp schema file and when I build my project the generated code includes references to
crate::c++_capnp
. Is it possible to change the name in the rust build so that the generated code uses a different name (e.g.cpp_capnp
) or is there some other workaround?The text was updated successfully, but these errors were encountered: