cargo-all-features
cargo-hack
cargo-all-features | cargo-hack | |
---|---|---|
2 | 4 | |
130 | 540 | |
- | - | |
5.1 | 9.3 | |
8 months ago | 10 days ago | |
Rust | Rust | |
Apache License 2.0 | 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-all-features
-
Compilation Testing of Multiple Feature Flags
https://github.com/frewsxcv/cargo-all-features or I’m sure there’s others equally findable by googling “cargo all combinations feature flags”.
-
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.
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?
tarpaulin - A code coverage tool for Rust projects
cargo-sweep - A cargo subcommand for cleaning up unused build files generated by Cargo
juniper - GraphQL server library for Rust
cargo-cache - manage cargo cache (${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively
cargo-minimal-versions - Cargo subcommand for proper use of -Z minimal-versions and -Z direct-minimal-versions.
cargo-whatfeatures - a simple cargo plugin to get a list of features for a specific crate
cargo-mutants - :zombie: Inject bugs and see if your tests catch them!
just - 🤖 Just a command runner
reference - The Rust Reference
rat-rs - A simple cli tool to fetch transports schedules on the Ile-de-France région
cargo-edit - A utility for managing cargo dependencies from the command line.