Skip to content

Build subcommand or option that builds all targets (including tests) #2495

Closed
@bruno-medeiros

Description

@bruno-medeiros

Currently cargo build will build the lib target and the bin targets, but none of the test targets.
cargo test --no-run will build the tests targets (and the lib target), but not the bin targets.

Ideally, there should be a cargo build command or option that would build all the crate's targets. Not just for convenience and (possibly) better performance, but also to be be able to integrate future cargo build options and have them apply to the test targets builds too. For example, using "cargo check" or something similar. (#1313)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions