Giter VIP home page Giter VIP logo

cargo-gc-target's Introduction

cargo-gc-target

Deprecated in favor of cargo-sweep

A cargo sub-command to delete unused files in your cargo target directory.

Installation

cargo install cargo-gc-target

Your cargo version should be at least 1.51.0.

Usage

In your project/workspace directory, simple run:

cargo gc

Note: It's gc. Not gc-target.

It can automatically follow custom target-dir specified in .cargo/config or environment variable CARGO_TARGET_DIR.

Limitations

  • It doesn't work well on shared target directory, since a simple tracing GC will erase all artifacts untracable from current workspace but may still referenced in some other workspaces.

    When resolved target directory is outside the workspace, an error will be emitted to protect user from accidentally erasing shared target directory. If you really know what you are doing, pass -f to force GC anyway.

  • Cargo target hierarchy and metadata calculation may change between versions. When using cargo other than 1.51.0, it may incorrectly remove tracable artifacts. Use it with care!

Supported directories to GC

Path Content GC supported?
target/<profile>/deps Artifacts of dependencies
target/<profile>/build Build scripts and outputs
target/<profile>/.fingerprint Cargo fingerprints
target/<profile>/<bin> Final binary or libraries
target/<profile>/incremental Rustc incremental temps
target/<profile>/examples Example artifacts
target/doc Documentations

License

MIT Licensed.

cargo-gc-target's People

Contributors

oxalica avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

cargo-gc-target's Issues

Unable to install

Compilation failed when installing cargo-gc-target.

Error log: https://pastebin.com/s8GYF5Lm

active toolchain
----------------

nightly-x86_64-unknown-linux-gnu (default)
rustc 1.53.0-nightly (07e0e2ec2 2021-03-24)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.