Skip to content

RLS and cargo check run sometimes unnecesary build.rs steps #6834

@robmv

Description

@robmv

When running an IDE using RLS or just running cargo check, some large projects using crates that have big static builds of non Rust based native libraries, the build.rs of those dependencies run a complete build of the non Rust code.

One example is openssl, when using it in vendored mode, takes a lot of time to get feedback on an IDE because it will build openssl entirely, something it isn't needed for getting the information RLS or cargo check needs, they don't need a complete build of those crates.

Maybe standardizing some kind of environment variable passed to the build.rs program could tell these dependencies that the build is being run for RLS or cargo check, and these scripts could be updated to be smarter, avoiding the native build in these circumstances.

This will require cooperation of build.rs users but it is better than than the current status where an IDE takes too much time to give some feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-build-scriptsArea: build.rs scriptsC-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions