Open ahayzen-kdab opened 4 months ago
Funnily enough, I've tried this literally 2 min. ago.
Alas, it doesn't work :/
The approach I took:
cxx
from cxx_qt
use cxx_qt::cxx;
in front of each generated cxx bridgeNow I get the following error:
error[E0433]: failed to resolve: could not find `cxx` in the list of imported crates
--> examples/qml_minimal/rust/src/cxxqt_object.rs:12:1
|
12 | #[cxx_qt::bridge]
| ^^^^^^^^^^^^^^^^^ could not find `cxx` in the list of imported crates
|
= note: this error originates in the attribute macro `cxx_qt::bridge` (in Nightly builds, run with -Z macro-backtrace for more info)
Checking this out with cargo expand
, the issue seems to be that CXX is generating its own paths in the form of ::cxx::...
Which means it's fully-qualifying the path to cxx.
And afaik this means it will definitely look for a crate of that name, which must be added as a direct dependency :cry: .
So I think we may have to close this as wontfix
:/
Can we avoid needing cxx as a dependency and instead use CXX as a dependency of cxx-qt/cxx-qt-build and reexport it? This will ensure that the cxx version is the same etc.