Skip to content

cargo-tree: Add no-proc-macro to edges flag #9165

Closed
@XAMPPRocky

Description

@XAMPPRocky

Describe the problem you are trying to solve

We're trying evaluate what dependencies are ending up in the final binary of a program, cargo-tree -e normal gets us most of the way there, however normal still includes proc-macros and their dependencies, which are only run on the host machine and don't end up in the final target binary, proc-macros usually have a lot of dependencies so the list given by tree is cluttered, and requires manual filtering to get the final list of dependencies. It would be nice if there was an option to only see dependencies which will be compiled to the target platform.

Describe the solution you'd like

Add -e no-proc-macro edge to remove all dependencies that are currently marked as a proc-macro and their sub-dependencies.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Command-tree

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions