#Target files and disk space.

5 messages · Page 1 of 1 (latest)

shut yew
#

Do you need a lot of disk space for those target files?
5-6 Rust projects just filled up my 16GB thing.

Well, someone suggested me to use a specify target path if I am focused on one project. (Because target files of different projects override each other.)
But I did not do this because I am a Rust noob who do not really "focus" on just one project.

Btw, I dual boots Mac and Linux. So the amount of target files double.

leaden vapor
#

You can use cargo clean to clean up the artifacts for a project

#

But yes, generally the target folder gets quite large

worn igloo
#

The size depends on a lot of factors, but some to watch out for include:

  • Quantity of dependencies
  • Some dependencies are much heavier than others; possibly because of the above, or the use of build scripts or other assets
  • Each time you publish a new version of a crate, a separate build is saved to target/package/
  • Building for multiple targets, and/or for both debug and release profiles. (each variation makes a unique build)
dusty raptor