Skip to content

Encapsulate rust toolchain details behind a depset with all inputs #843

Open

Description

@hlopko

Right now, rust_toolchain has many simple fields that return rustc binary, rustc_lib files, C++ toolchain files, rust stdlib files, or with #836 also target json file.

AFAIK there is not a good reason why we need these fine grained artifacts. It will be more convenient to use and more backward-compatibility-friendly to expose one "all inputs relevant to compilations" depset that contains all users need. What's even better is that Bazel can save a bit of memory by reusing this single depset instead of creating slightly duplicated ones.

Activity

  1. self-assigned this
    on Jul 19, 2021
  2. hlopko commented on Jul 19, 2021

    @hlopko
    MemberAuthor

    Oh one more detail - the way inputs for rustc action, rustdoc action, and cargo build script action are computed is slightly different in each of them, very likely unintentionally. Another reason to provide a better API.

  3. added
    needs-triage
    on Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Technical debtmaintenanceneeds-triage

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions