cargo-hack
cargo-edit
cargo-hack | cargo-edit | |
---|---|---|
4 | 45 | |
551 | 2,997 | |
- | - | |
9.3 | 7.4 | |
13 days ago | 3 months ago | |
Rust | Rust | |
Apache License 2.0 | MIT License |
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-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.
cargo-edit
-
Hey Rustaceans! Got a question? Ask here (23/2023)!
“cargo add” from https://github.com/killercup/cargo-edit has that behavior, but not the built in one that was added to cargo
-
Is Rust's cargo-edit crate still relevant?
I have also noticed that the last commit of cargo-edit crate's GitHub repo (https://github.com/killercup/cargo-edit) was two days ago (pretty recent.) So it is probably relevant for a lot of people.
-
What are some useful tools for Rust?
cargo-upgrade from cargo-edit (somewhat more intentional than builtin update)
-
How to list upgradable crates programmatically
I've also tried cargo-upgrade from cargo-edit like so:
-
Hey Rustaceans! Got a question? Ask here (9/2023)!
You can also see how other crates do it. For example, cargo-edit is just like that - a single package with a library with a couple of small cli wrappers around it. You can compare their Cargo.toml to yours, maybe there is something different about them.
-
`toml` vs `toml_edit` (ie `toml` 0.6 is out)
Just to check, are you aware of cargo-edit's cargo-set-version or cargo-release?
-
Rust 1.66
Speaking of cargo remove, see also cargo-edit [0] from which adding and removing originally came, as well as cargo-binstall [1] which installs binaries rather than compiling from source every time. The binaries are updatable with cargo-update [2].
The latter two can replace a package manager for Rust related utilities, as I often find that those in OS package repositories are often not as up to date as directly from cargo.
[0] https://github.com/killercup/cargo-edit
[1] https://github.com/cargo-bins/cargo-binstall
[2] https://github.com/nabijaczleweli/cargo-update
-
TIL about cargo add
For context, it was/is part of cargo-edit crate which provides other nice functionalities as well. Hope all gets integrated in time.
-
how can I use same crate but with different features?
https://github.com/killercup/cargo-edit can use the F option
- `cargo-set-version` support for workspace inheritance released in cargo-edit 0.11.4!
What are some alternatives?
cargo-all-features - A Cargo subcommand to build and test all feature flag combinations.
nexus-repository-cargo - Nexus Repository Cargo Format
cargo-sweep - A cargo subcommand for cleaning up unused build files generated by Cargo
cargo-outdated - A cargo subcommand for displaying when Rust dependencies are out of date
cargo-cache - manage cargo cache (${CARGO_HOME}, ~/.cargo/), print sizes of dirs and remove dirs selectively
cargo-do - allows you to run multiple cargo commands in a row
cargo-whatfeatures - a simple cargo plugin to get a list of features for a specific crate
Cargo - The Rust package manager
just - 🤖 Just a command runner
cargo-dot - Generate graphs of a Cargo project's dependencies
rat-rs - A simple cli tool to fetch transports schedules on the Ile-de-France région
cargo-script - Cargo script subcommand