Currently, the Cargo build-dir's internals are considered internal to Cargo.
Assuming a specific file structure is considered relying on Cargo's implementation details are not subject to Cargo's stability guarantees.
However there are usecases where tools need to use intermediate build artifacts from rustc, but not all files in build-dir have a stable way to access them so tools are forced to assume on the build-dir's file layout to work.
This is not ideal as when Cargo change's the build-dir internals it leads to breakage for tools (e.g. #15010)
This issue is serves a place to collect the various usecases to hopes that we could provide stable ways interact with build-dir artfiacts.
Known Usecases
Currently, the Cargo
build-dir's internals are considered internal to Cargo.Assuming a specific file structure is considered relying on Cargo's implementation details are not subject to Cargo's stability guarantees.
However there are usecases where tools need to use intermediate build artifacts from rustc, but not all files in build-dir have a stable way to access them so tools are forced to assume on the build-dir's file layout to work.
This is not ideal as when Cargo change's the
build-dirinternals it leads to breakage for tools (e.g. #15010)This issue is serves a place to collect the various usecases to hopes that we could provide stable ways interact with
build-dirartfiacts.Known Usecases
build --testandtest --no-run#1924cargo testartifact separately #17026trybuild, see cargo build-dir-new-layout breaks feature detection dtolnay/trybuild#336)