-
Notifications
You must be signed in to change notification settings - Fork 79
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
figure out and document how to link multiple cxx-qt modules into an application #148
Comments
Related: #119 |
I assume you mean multiple crates ? And not multiple modules, as we support already defining multiple modules that are in the same crate and are then expose multiple QObject's to C++. Are you describing having multiple Rust crates so that there would be two Rust static libraries to link to the C++ application ? As I don't really see why that wouldn't work already ? (or would there be collisions where some CXX things are the same in both the libs?) Once we have the CMake CLI tool it'll be easier to work with cargo workspaces too. |
Proof of concept of that is in #598. Unfortunately it is blocked on rust-lang/rust#108081 upstream. |
This may be done now? We should double-check for 0.8 |
Application developers will likely want to link multiple cxx-qt modules into applications. I can think of two approaches this could take:
rlib
crates. Link them together into onestaticlib
crate and link thestaticlib
crate into the C++ application. This is the approach Firefox takes: https://hg.mozilla.org/mozilla-central/rev/841c2247f57d, https://bugzilla.mozilla.org/show_bug.cgi?id=1163224staticlib
crate with separate modules using cxx-qt within it. I doubt this would be a good idea for build times because Cargo parallelizes at the level of crates, not modules.The text was updated successfully, but these errors were encountered: