cargo diet is a companion program of The Lean Crate Initiative to help computing 'optimal' include directives for your
Cargo.toml manifest. 'optimal' here is the smallest size a crate can have while retaining everything relevant to building the code and populating crates.io and
lib.rs with useful information on the landing page.
Please note that this opinionated approach won't prevent you to adjust the initial include directive to your liking and needs, without cargo diet
interfering with you on subsequent invocations.
Usage
-
make the crate lean by editing the
Cargo.tomlfile in placecargo diet
-
simulate how the
Cargo.tomlfile would be edited to obtain a lean cratecargo diet -norcargo diet --dry-run
-
force computing an
includedirective even though one exists alreadycargo diet -rorcargo diet --reset-manifest- can also be used with
--dry-runsuch as incargo diet --reset-manifest --dry-runorcargo diet -rn
Installation
Using Cargo
With a recent version of cargo (obtainable using rustup), the following should work:
Using GitHub releases
Pre-built binaries can be found in the releases section of this repository.
Development
Run tests
Learn about other targets
make