You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core: consumers get core's Rust tools prebuilt, not built from source #6517
Goal: core stops building Rust tools from source in consumer builds, so a consumer's graph no longer needs rules_rust, crate_universe or a hermetic C/C++ toolchain just to run dx check.
Today quality/real_aspects.bzl:2311 points the aspects at //quality/runner:quality_runner, a rust_binary built from source (quality/runner/BUILD.bazel). Every consumer therefore resolves rules_rust, the @crates hub and a cc toolchain to link it. Only @rules_dx//:dx is prebuilt today (cli/prebuilt/hub.bzl).
Plan (agent): size L, opus (plan first, then split)
Options to weigh: ship the consumer-facing Rust tools as release assets through the existing dx_prebuilt hub, or fold them into the dx binary as subcommands so there is one prebuilt asset. Building from source must keep working when rules_dx is the root module, and when from_source is set.
Unblocks: moving rules_rust, the crate macros and the default C/C++ toolchain out of core (see the cc and rust slices of #6054).
Do before #6054 (does not depend on it)
Part of #6032
Still blocked: the issue says to do this after #6054, which is open. It is also size L and needs a plan first (prebuilt release assets via dx_prebuilt vs folding the tools into dx subcommands). No code attempted. CI runners do not remove this blocker.
Plan (agent): size L. Decision: fold the consumer-facing quality tools into dx as subcommands, one prebuilt asset. Not a second asset through the hub.
Facts:
The only Rust binary every consumer builds on dx check is //quality/runner:quality_runner (26k LOC, quality/real_core.bzl:141). quality_markdown (2k) and quality_notebook (1.4k) join it when those targets exist (quality/families/core.bzl:22,29). Everything else (deploy/*, tools/docs/*/extract, tools/coverage/*, env_shard_writer, codegen_shard_writer, js_launcher, exec_launcher, opa_test_launcher) is reached only through one family's rules and moves with that family under modules: move the remaining families to families/<family> #6054.
dx already links quality_result. The runner adds zip; markdown adds pulldown-cmark and unicode-properties. dx is 69 MiB today, so the growth is small.
A second hub asset touches cli/prebuilt/hub.bzl (ASSET_PLATFORMS, exe at :95), pins.bzl, cli/adopt/src/launcher.rs:11RELEASE_ASSETS, tools/ci/fill_pins.rs, release.yml:92,106,117,349, release-cells.yml and deploy/release/matrix.bzl, per asset, per cell. The subcommand route touches none of them.
dx has no clap tree; a command is added in cli/plan/src/args/command.rs, grammar.rs, parser.rs and cli/cli/src/exec.rs:338.
Steps:
Hidden commands dx quality-runner, dx quality-markdown, dx quality-notebook that call the crates' lib entry points. The three rust_binary targets stay as thin wrappers for root builds and tests.
quality/real_core.bzl:141_runner and core.bzl:22,29 default to @rules_dx//:dx (the hub alias) with cfg = "exec"; the argv gains the subcommand. Action keys for a fixed fixture must not change otherwise.
Root module and from_source keep building from source; //quality/... tests do not change.
Risk: cfg = "exec" selects the exec platform's prebuilt dx; remote execution with another exec platform needs that asset in the hub, the same rule dx has today.
Ordering: this does not depend on #6054. Doing it first shrinks the cc and rust slices (#6504, #6516), because consumers then stop needing rules_rust and a cc toolchain for dx check at all. The blocked label stays until the owner confirms the order.
This issue has the blocked label but no Blocked on: line in its body. Add one naming the blocking issue (#N), a pull request URL, or the owner action. See CONTRIBUTING.md.
Plan: dx as a multicall binary. Supersedes the subcommand plan above.
Order: this goes before #6054. It does not depend on it, and landing it first shrinks the cc and rust slices (#6504, #6516).
dx checks argv[0]. If its file stem is quality_runner, quality_markdown or quality_notebook, it runs that tool's library entry point (run_cli). No other names.
@dx_prebuilt exposes the prebuilt dx under those three names (native_binary per tool per pinned key). Root, from_source, unpinned and unsupported platforms point at today's source binaries, so root builds keep their cache.
quality/real_core.bzl and quality/families/core.bzl default to @dx_prebuilt//:quality_runner, :quality_markdown, :quality_notebook. Tool arguments do not change.
The release pipeline does not change: one asset per platform.
Rejected: one release asset per tool (touches hub, pins, launcher, fill_pins, release.yml per asset); hidden dx quality-* subcommands (every argv changes, any dx edit reruns every lint in root builds).
Risk: aliases follow the exec platform, so remote execution on another platform needs that asset pinned, the same rule as dx today. Pins are empty today, so consumers see no change until #1388.
Activity
TrapsterDK commentedon Nov 5, 2026
Still blocked: the issue says to do this after #6054, which is open. It is also size L and needs a plan first (prebuilt release assets via dx_prebuilt vs folding the tools into dx subcommands). No code attempted. CI runners do not remove this blocker.
TrapsterDK commentedon Nov 5, 2026
Plan (agent): size L. Decision: fold the consumer-facing quality tools into
dxas subcommands, one prebuilt asset. Not a second asset through the hub.Facts:
dx checkis//quality/runner:quality_runner(26k LOC,quality/real_core.bzl:141).quality_markdown(2k) andquality_notebook(1.4k) join it when those targets exist (quality/families/core.bzl:22,29). Everything else (deploy/*,tools/docs/*/extract,tools/coverage/*,env_shard_writer,codegen_shard_writer,js_launcher,exec_launcher,opa_test_launcher) is reached only through one family's rules and moves with that family under modules: move the remaining families to families/<family> #6054.dxalready linksquality_result. The runner addszip; markdown addspulldown-cmarkandunicode-properties.dxis 69 MiB today, so the growth is small.cli/prebuilt/hub.bzl(ASSET_PLATFORMS,exeat :95),pins.bzl,cli/adopt/src/launcher.rs:11RELEASE_ASSETS,tools/ci/fill_pins.rs,release.yml:92,106,117,349,release-cells.ymlanddeploy/release/matrix.bzl, per asset, per cell. The subcommand route touches none of them.dxhas no clap tree; a command is added incli/plan/src/args/command.rs,grammar.rs,parser.rsandcli/cli/src/exec.rs:338.Steps:
dx quality-runner,dx quality-markdown,dx quality-notebookthat call the crates' lib entry points. The threerust_binarytargets stay as thin wrappers for root builds and tests.quality/real_core.bzl:141_runnerandcore.bzl:22,29default to@rules_dx//:dx(the hub alias) withcfg = "exec"; the argv gains the subcommand. Action keys for a fixed fixture must not change otherwise.from_sourcekeep building from source;//quality/...tests do not change.dx checkfetches norules_rustcrates; lock size before and after (the modules: measure what a Python-only consumer resolves and fetches #6046 number).Risk:
cfg = "exec"selects the exec platform's prebuiltdx; remote execution with another exec platform needs that asset in the hub, the same ruledxhas today.Ordering: this does not depend on #6054. Doing it first shrinks the cc and rust slices (#6504, #6516), because consumers then stop needing
rules_rustand a cc toolchain fordx checkat all. Theblockedlabel stays until the owner confirms the order.github-actions commentedon Nov 5, 2026
This issue has the
blockedlabel but noBlocked on:line in its body. Add one naming the blocking issue (#N), a pull request URL, or the owner action. See CONTRIBUTING.md.TrapsterDK commentedon Nov 6, 2026
Plan:
dxas a multicall binary. Supersedes the subcommand plan above.Order: this goes before #6054. It does not depend on it, and landing it first shrinks the cc and rust slices (#6504, #6516).
dxchecks argv[0]. If its file stem isquality_runner,quality_markdownorquality_notebook, it runs that tool's library entry point (run_cli). No other names.@dx_prebuiltexposes the prebuiltdxunder those three names (native_binaryper tool per pinned key). Root,from_source, unpinned and unsupported platforms point at today's source binaries, so root builds keep their cache.quality/real_core.bzlandquality/families/core.bzldefault to@dx_prebuilt//:quality_runner,:quality_markdown,:quality_notebook. Tool arguments do not change.Rejected: one release asset per tool (touches hub, pins, launcher, fill_pins, release.yml per asset); hidden
dx quality-*subcommands (every argv changes, anydxedit reruns every lint in root builds).Risk: aliases follow the exec platform, so remote execution on another platform needs that asset pinned, the same rule as
dxtoday. Pins are empty today, so consumers see no change until #1388.