cargo-sweep
cargo-hack
cargo-sweep | cargo-hack | |
---|---|---|
9 | 4 | |
680 | 547 | |
- | - | |
6.6 | 9.3 | |
about 2 months ago | 10 days ago | |
Rust | Rust | |
MIT License | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cargo-sweep
-
Target file are very huge and running out of storage on mac.
You can use cargo sweep or kondo to clean up unused files.
-
What are some useful tools for Rust?
cargo-sweep
-
crates.io now has more than 100,000 crates!
[1]: https://github.com/holmgr/cargo-sweep
-
Cargo Clean All - A cargo plugin to clean all your projects at once with filters
I use https://github.com/holmgr/cargo-sweep which can keep files from the current compiler version, but delete files from earlier compilers that won't ever be used again.
-
Announcing cargo-cleanall
How is this different from https://github.com/holmgr/cargo-sweep ?
-
Is this normal? Giant debug folder
I like https://github.com/holmgr/cargo-sweep to keep the size of /target from unbounded growth without fully losing the useful portion of the cache. It's the same outcome as Cargo clean after a reboot but I recently also started using a ramdisk with CARGO_TARGET_DIR. Much easier to do on Linux.
- Cargo clean for a number of projects
-
Blog Post: Fast Rust Builds
cargo-sweep can do this kind of garbage collection along a few axes - rustc version, file age, was or wasn't used during recent build. Works great on Linux. I've not gotten it working reliably for -s/-f on MacOS+APFS, but for the CI use case it should be a nice improvement.
-
STOP DOING RUST
holmgr is a god and cargo-sweep is a godsend
cargo-hack
-
What are some useful tools for Rust?
cargo-hack for workspaces or projects that make heavy use of crate features
-
Is there a known way to minimize features of dependencies after the code is done?
When I'm managing cargo flags myself I have also found cargo-hack useful to make sure that all of my possible combos still build and pass tests. Sometimes that's helped me find an implicit feature I needed to declare.
-
How to write generic code for both thread-local and concurrent modes?
As a note for OP, be sure to not try to use this approach for code that's intended to be mutually-exclusive approaches. Code based on features should be designed so that any combination of crate features can be enabled simultaneously, including zero or all of them. Ideally the crate should always build and run under any permutation - if you want a way to test this exhaustively you can run your tests via cargo-hack.
-
PSA - Most Rust tooling runs only on the default feature set and current platform if no special steps are taken
For features: You can use cargo-hack or cargo-all-features to run on all feature combinations.
What are some alternatives?
cargo-chef - A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.
cargo-all-features - A Cargo subcommand to build and test all feature flag combinations.
rules_rust - Rust rules for Bazel
cargo-cache - manage cargo cache (${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively
cargo-clean-all
cargo-whatfeatures - a simple cargo plugin to get a list of features for a specific crate
kondo - Cleans dependencies and build artifacts from your projects.
just - 🤖 Just a command runner
squatternaut - A snapshot of name squatting on crates.io
rat-rs - A simple cli tool to fetch transports schedules on the Ile-de-France région
proc-macro2
cargo-edit - A utility for managing cargo dependencies from the command line.