Skip to content

prebuilt: qt_rust_bridge runs as dx qt_rust_bridge (part of #13154) - #13928

Merged
TrapsterDK merged 1 commit into
mainfrom
qt-rust-bridge-dx-13773
Nov 19, 2026
Merged

TrapsterDK merged 1 commit into
mainfrom
qt-rust-bridge-dx-13773

Conversation

@TrapsterDK

Copy link
Copy Markdown
Collaborator

Closes #13773. Part of #13154.

qt_rust_bridge and qt_rust_runtime_files now run @dx_prebuilt//:dx qt_rust_bridge <mode> ... through a private _dx attr. A user-supplied generator still runs as <generator> <mode> ..., without the subcommand.

  • qt/private/tools/rust: main.rs -> lib.rs with run_process(&[String]) -> i32; [[bin]] -> [lib]; rust_library visible to //cli/cli; unit tests for usage, a missing bridge and header.
  • cli/cli: Tool::QtRustBridge in subcommand_for, dispatch in main.rs, dep in BUILD.bazel.
  • qt/private/rust_bridge.bzl, qt/private/defs.bzl: QT_BRIDGE_TOOL removed; generator has no default.
  • qt/tests: rules_test_bridge asserts argv[0] is dx and argv[1] is qt_rust_bridge; new rules_test_bridge_generator over a stub generator fixture in qt/tests/fixtures/other.
  • cargo-bazel-lock.json repinned with CARGO_BAZEL_REPIN=workspace bazel fetch --repo=@crates.
  • qt/README.md and generated docs/languages/qt.md: default is dx qt_rust_bridge; stale cxx 1.0.202 / cxxbridge1$202$ fixed to 1.0.205 / cxxbridge1$205$ (read from dx qt_rust_bridge cxx output).

dx size (bazel build -c opt //cli/cli:dx, linux x86_64): 48,223,776 B before, 56,029,008 B after (+7.8 MB, cxx-qt-gen and cxx-gen).

Tests run locally:

  • bazel test //qt/private/tools/rust:all //cli/cli:dx_cli_test: pass.
  • bazel test --platforms=//qt:linux_x86_64 --extra_execution_platforms=//qt:linux_x86_64 //qt/tests:rules_test_bridge //qt/tests:rules_test_bridge_generator //qt/tests:rules_test_rust_foreign: pass (with the default host platform the Qt-cell tests are SKIPPED). rules_test_rust_module fails under that platform override with dynamic_lookup flag on @@+qt+dx_qt_linux_x86_64_qtbase//:closure, in code this PR does not touch.
  • bazel run //cli/cli:dx -- qt_rust_bridge header <tmp>/cxx.h: writes cxx.h.
  • tools/dx check --apply on the touched packages: no findings in changed lines. It still reports unused_crate_dependencies for cxx/cxx_qt on qt_rust_bridge (the same deps the old binary had), plus findings in files this PR does not touch. --affected fails to query on main: tools/testing/deep_graph/BUILD.bazel: file '//typescript:defs.bzl' does not contain symbol 'ts_config'.

Not run locally: nested-Bazel and *_consumer_test targets (CI runs them).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

qt_rust_bridge and qt_rust_runtime_files run `@dx_prebuilt//:dx qt_rust_bridge`
unless a generator is passed, so the CXX-Qt generator ships inside the dx
multicall. The README names the cxx 1.0.205 pin and its cxxbridge1$205$ symbols.

Closes #13773

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K
@TrapsterDK
TrapsterDK merged commit 48616cd into main Nov 19, 2026
2 of 4 checks passed
@TrapsterDK
TrapsterDK deleted the qt-rust-bridge-dx-13773 branch November 19, 2026 12:19
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.

prebuilt: qt_rust_bridge runs as dx qt_rust_bridge (part of #13154)

1 participant