Cargo extension to recycle outdated build artifacts

Related tags

Utilities cargo-gc
Overview

cargo gc

Crates.io License

Cargo extension to recycle outdated build artifacts. And try the best to avoid recompilation.

Usage

Install it with cargo:

cargo install cargo-gc-bin

The executable is cargo-gc. You can invoke it with cargo gc command:

cargo gc

It will check and remove all outdated build artifacts in the current project. See cargo gc --help for more information.

Limitations / Known issues

  • It needs to invoke cargo build that takes lots of time.
  • Need to re-link after GC
  • cargo check will re-check from scratch

Explaination

cargo gc uses the output information from cargo build to help recognize build artifacts in use, and removes all others. In the current implementation, top-level arficats are not recognized and leads to re-link after GC.

Compare to other utils like cargo sweep, this one is based on the informations provided by cargo itself rather than filesystem timestamp. So it can be more accurate and still avoiding recompilation as much as possible.

Next steps

Technically, it's possible to implement a "perfect" GC that can remove all outdated artifacts without any recompilation. And done this in a totally static way (i.e., without invoking cargo build). As the tuple ("crate name", "fingreprint") can be computed outside of cargo.

You might also like...
cargo, make me a project
cargo, make me a project

cargo-generate cargo, make me a project cargo-generate is a developer tool to help you get up and running quickly with a new Rust project by leveragin

Render cargo dependency tree in online

Cargo Tree Online Check out rendered page Render cargo dependency tree in online. Usage trunk serve Copy and paste the content of Cargo.lock file to

Generate a THIRDPARTY file with all licenses in a cargo project.

cargo-bundle-licenses Bundle all third-party licenses into a single file. NOTE This tools is not a lawyer and no guarantee of correctness can be made

Rust+Cargo lightweight hello world with the most minimum binary size possible.

Lightweight Cargo Hello World Rust+Cargo lightweight hello world with the most minimum binary size possible. requirements 1: Rustup (Rustc, Cargo) Ins

Plugin to request a relaunch when uploading a Skyline plugin through cargo skyline

restart-plugin A skyline plugin for allowing cargo-skyline (or other tools) to restart your game without you having to touch your controller. Install

Convenience wrapper for cargo buildscript input/output

A convenience wrapper for cargo buildscript input/output. Why? The cargo buildscript API is (necessarily) stringly-typed.

A cargo subcommand that displays the assembly generated for Rust source code

cargo-show-asm A cargo subcommand that displays the assembly generated for Rust source code.

Cargo subcommand for optimizing binaries with PGO and BOLT.
Cargo subcommand for optimizing binaries with PGO and BOLT.

cargo-pgo Cargo subcommand that makes it easier to use PGO and BOLT to optimize Rust binaries. Installation $ cargo install cargo-pgo You will also ne

Mommy's here to support you when running cargo~

cargo-mommy Mommy's here to support you when running cargo~ ❤️ Installation Install cargo-mommy like you would any other cargo extension~ cargo inst

Owner
Ruihang Xia
羡长江之无穷
Ruihang Xia
cargo-lambda is a Cargo subcommand to help you work with AWS Lambda.

cargo-lambda cargo-lambda is a Cargo subcommand to help you work with AWS Lambda. The new subcommand creates a basic Rust package from a well defined

null 184 Jan 5, 2023
A cargo subcommand that extends cargo's capabilities when it comes to code generation.

cargo-px Cargo Power eXtensions Check out the announcement post to learn more about cargo-px and the problems it solves with respect to code generatio

Luca Palmieri 33 May 7, 2023
Annotation to easily define ad-hoc / one-shot extension traits

Annotation to easily define ad-hoc / one-shot extension traits

Daniel Henry-Mantilla 2 Apr 19, 2022
Tons of extension utility functions for Rust

LazyExt Tons of extension utility functions for Rust. English | 简体中文 Status Name Status Crate Documents Introduction lazyext-slice Alpha Thousands of

Al Liu 2 Dec 5, 2022
A lambda extension to hot reload parameters from SSM Parameter Store, Secrets Manager, DynamoDB, AppConfig

A lambda extension to hot reload parameters from SSM Parameter Store, Secrets Manager, DynamoDB, AppConfig

Jake Scott 7 Jun 12, 2022
Searchbuddy is a browser extension that lets you chat with people that are searching for what you're searching for.

searchbuddy Make friends while searching! Searchbuddy is a browser extension that lets you chat with people that are searching for what you're searchi

Joseph Gerber 14 May 23, 2022
Rust Lambda Extension for any Runtime to preload SSM Parameters as 🔐 Secure Environment Variables!

?? Crypteia Rust Lambda Extension for any Runtime to preload SSM Parameters as Secure Environment Variables! Super fast and only performaned once duri

Custom Ink 34 Jan 7, 2023
Extension registry for Lapce Registry

Lapce Registry This is the software running the lapce plugin registry, this manages and hosts plugins that the community uploads. Run the registry loc

Lapce 15 Dec 4, 2022
An experimental Athena extension for DuckDB 🐤

DuckDB Athena Extension WARNING This is a work in progress - things may or may not work as expected ??‍♂️ Limitations Only the default database is sup

Damon P. Cortesi 34 Apr 3, 2023
The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying the function code.

Chaos Extension - Seamless, Universal & Lightning-Fast The lambda-chaos-extension allows you to inject faults into Lambda functions without modifying

AWS CLI Tools 5 Aug 2, 2023