target is sometimes used as a cache location for things not directly generated by Cargo, but rust-cache deletes them. For example, this job https://github.com/rust-lang/rustc_apfloat/actions/runs/35438411679/job/105885391420 downloads LLVM and stashes it in target, but it is removed before creating the cache:
[4](https://github.com/rust-lang/rustc_apfloat/actions/runs/35437756735/job/105883349149#step:13:55)
##[debug]collecting metadata for "/home/runner/work/rustc_apfloat/rustc_apfloat"
##[debug]workspace "/home/runner/work/rustc_apfloat/rustc_apfloat" has 89 packages
... Cleaning /home/runner/work/rustc_apfloat/rustc_apfloat/target ...
##[debug]cleaning target directory "/home/runner/work/rustc_apfloat/rustc_apfloat/target"
##[debug]cleaning profile directory "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/.cargo-artifact-lock"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/examples"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/.cargo-build-lock"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/incremental"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/.cargo-lock"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/build/rustc_apfloat-fuzz"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/debug/build/rustc_apfloat"
##[debug]deleting "/home/runner/work/rustc_apfloat/rustc_apfloat/target/.rustc_info.json"
##[debug]cleaning target directory "/home/runner/work/rustc_apfloat/rustc_apfloat/target/tmp"
##[debug]cleaning target directory "/home/runner/work/rustc_apfloat/rustc_apfloat/target/llvm-downloads"
##[debug]cleaning target directory "/home/runner/work/rustc_apfloat/rustc_apfloat/target/llvm-downloads/llvm-project-a284bdb31146"
...
Would it be possible to not auto-delete files that aren't part of Cargo's layout, or allowing specific files/directories to skip deleting?
targetis sometimes used as a cache location for things not directly generated by Cargo, but rust-cache deletes them. For example, this job https://github.com/rust-lang/rustc_apfloat/actions/runs/35438411679/job/105885391420 downloads LLVM and stashes it intarget, but it is removed before creating the cache:Would it be possible to not auto-delete files that aren't part of Cargo's layout, or allowing specific files/directories to skip deleting?