feat(qbz-qt): phase 0 — crate skeleton + cxx-qt toolchain gate

New qbz-qt bin crate (cxx-qt 0.7 + QML) as the only default workspace
member in this worktree, so plain cargo build produces just the Qt
binary. Gate verified against system Qt 6.11.1 (codegen, moc,
qmltyperegistrar, qrc load, offscreen run all green).

km
This commit is contained in:
vicrodh committed 2026-07-27 11:36:18 -06:00
1 parent 82fea6257c
commit 469f83781d
6 files changed
+108

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
//! Phase 0 toolchain-gate bridge.
//!
//! A single trivial QObject proves the cxx-qt codegen <-> Qt 6.11 pipeline
//! (qmltyperegistrar, moc, CMake link) before any real binding work lands.
#[cxx_qt::bridge]
mod qbz_bridge {
extern "RustQt" {
#[qobject]
#[qml_element]
#[qproperty(QString, greeting)]
type HelloBridge = super::HelloBridgeRust;
}
extern "C++" {
include!("cxx-qt-lib/qstring.h");
type QString = cxx_qt_lib::QString;
}
}
/// Rust side of the phase-0 object (constructed from QML if instantiated).
#[derive(Default)]
pub struct HelloBridgeRust {
greeting: cxx_qt_lib::QString,
}