Skip to content

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

Closed

Description

@TrapsterDK

Part of #13154.

Where

  • qt/private/tools/rust/BUILD.bazel:9-22 and qt/private/tools/rust/src/main.rs: the qt_rust_bridge binary (cxx-qt-gen, cxx-gen, syn).
  • qt/private/rust_bridge.bzl:6 (QT_BRIDGE_TOOL), :14-29 (_bridge), :62 and :111 (generator attrs), :66-81 (header mode).
  • The public generator parameter: qt/private/defs.bzl:570,590 and qt/private/rust.bzl:22,58.

Fix

  • Turn the binary into a lib with run_process(&[String]) -> i32, add qt_rust_bridge to subcommand_for, and give dx the dep.
  • qt_rust_bridge and qt_rust_runtime_files get a private _dx attr (@dx_prebuilt//:dx, exec), and generator defaults to None. With no generator, the action runs dx with qt_rust_bridge as the first argument. A user-supplied generator still runs as before, without the subcommand.
  • Add an analysis test in qt/tests that argv[1] of QtRustBridge is qt_rust_bridge.
  • Note the dx size before and after in the PR, since cxx-qt-gen joins the binary.
  • Delete the binary and the [[bin]] entry, then repin cargo-bazel-lock.json.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Xut2hvgPbKqbuDgsTasg7K

Activity

  1. added
    enhancement
    P2
    model:opus
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2enhancementmodel:opus

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions