Skip to content

cargo check: re-use rlibs if possible #3341

@nrc

Description

@nrc

The current cargo check architecture (#3296) always uses rmeta files, even if an rlib is available, that means that if the rlib doesn't need to be rebuilt, then work is wasted. It would be good to use the rlib if possible.

This is a bit complex because:

  • we specify the file in an --extern arg to rustc, therefore we need to know which to use,
  • even if the rlib is fresh, one of its dependencies might not be, causing it to be rebuilt, if that happens we should just build an rmeta, not an rlib,
  • we therefore don't know until after the crate is built whether we should pass the rmeta or rlib using --extern
  • that info is not easily available in Cargo right now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions