Compiler copies files when working on my SSD

TL;DR

warning about hard linking files in incremental compilation. Copies of files are popping up on my external SSD in my project outliner. Help me adjust my config if you know what to do!

Howdy Rustaceans!

Long-time fan, first-time poster. Really enjoying the language. I've been pretty burnt out with technology until picking it up for fun, and I've really reignited my spark for computers!

I'm building myself an organizer/planner/calendar app and was doing a quick email-sending test in a sandbox project. My laptop's running out of space so I'm using an external SSD, the Crucial X9 Pro.

I'm just plugging it in and using cargo new to pop open a new project, not much config otherwise, and I'm using RustRover as my IDE. When I build, I get the following:

Warning:

hard linking files in the incremental compilation cache failed. copying files instead. consider moving the cache directory to a file system which supports hard linking in session dir /Volumes/X9 Pro/Rust/sandbox/target/debug/incremental/sandbox-397c0k9vm76yv/s-hacm13pd0k-0osrsr2-working

It does build successfully (and sends me an e-mail!!! yippee!!!), but my project's outliner shows a number of copied files like a ._main.rs under my actual main.rs, among others. What configuration should I do to temporarily resolve this?

My longer-term solution is a homelab setup with an old laptop running a linux server, but I'm just trying to fix what's in front of me at the moment. Thanks in advance for guidance!

Cheers,
Autumn :fallen_leaf:

It's looking like my issue is because I'm running an exFAT SSD, but I don't have anywhere to put my other files in order to reformat it :sob: I'll just have to do the annoying and more intensive storage config, I think. I'd love to disable incremental compilation in the meantime though. If there's a way to only do that on my SSD projects that'd be cool but I don't have much space on my temp machine anyway so I may just disable it altogether.

If you want to optimize for space at the expense of speed, try disabling incremental builds. That'll avoid writing out these files altogether.

1 Like

SSDPATH/.cargo/config.toml:

[build]
incremental = false

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.