Skip to main content

relocate_artifacts

Function relocate_artifacts 

Source
async fn relocate_artifacts(
    artifacts: Vec<ArtifactPath>,
    tmp_root: &Path,
) -> Result<Vec<ArtifactPath>>
Expand description

Copy each artifact from its path inside tmp_root to the corresponding path under target/, creating parent directories as needed, and return updated ArtifactPaths pointing at the new stable locations.

When --target-dir <tmpdir> is passed to cargo build, artifacts land at <tmpdir>/<triple>/release/<name>. Stripping the tmpdir prefix and prepending target/ gives the canonical path target/<triple>/release/<name>, which is where a normal cargo build --target <triple> would place them.