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

WIP: cxx-qt-build: use filename for rust name #200

Closed

Conversation

ahayzen-kdab
Copy link
Collaborator

This uses nightly feature to find the source file for the macro.
rust-lang/rust#54725

Requires #198

@Be-ing
Copy link
Contributor

Be-ing commented Aug 10, 2022

What is the reason for this change?

@ahayzen-kdab
Copy link
Collaborator Author

What is the reason for this change?

We need to figure out how to choose the C++ file name from the CXX-Qt blocks, as the old code was taking the module ident, the latest code is taking the QObject name. But this won't work when we support multiple QObject's in one block.

Ideally (i think) we would copy CXX and have the input Rust file name be the output C++ name too, but with the macros this creates fun for us as we need to write in the generated rust code the line include!("cxx-qt-gen/include/{file_name}.cxxqt.h"). The last commit on this branch was just showing how this could be done with nightly APIs (ugh).

But we need to think further about the best way of doing this, so for now it's WIP.

@ahayzen-kdab
Copy link
Collaborator Author

This was done via #856

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

Successfully merging this pull request may close these issues.

2 participants