| Crates.io | cargo-check-delta |
| lib.rs | cargo-check-delta |
| version | 0.2.0 |
| created_at | 2025-10-01 02:51:32.648807+00 |
| updated_at | 2025-10-01 02:51:32.648807+00 |
| description | A cargo subcommand to check only delta changes |
| homepage | |
| repository | https://github.com/nazo6/cargo-check-delta |
| max_upload_size | |
| id | 1861994 |
| size | 35,442 |
This cargo subcommand was created to solve the problem of rust-analyzer not working at all in a mixed workspace of crates with many different targets and features.
In addition to the diagnostics that rust-analyzer does on its own, it uses
cargo check at save time in the root of the workspace to get accurate
diagnostics. However, in a project like an embedded one, which contains many
dependencies and such that require specific feature flags to build, this will
only generate a lot of useless error messages.
One solution to this is to run diagnostics on a per-directory basis. This way, each crate's FEATURE will be properly resolved and the appropriate diagnostics will be generated. However, such a configuration does not currently exist in rust-analyzer, so this subcommand is useful.
And this subcommand does not just run cargo check on all crates. It saves a
file in the target folder with the source code path and its modification date
and time, and then detects the modified file the next time it is run, thereby
running cargo check only on the modified crate. This greatly speeds up
diagnosis.
cargo install --git https://github.com/nazo6/cargo-check-delta
# See help for detailed usage
cargo check-delta --help
cargo-check-delta can be used through rust-analyzer.check.command or
rust-analyzer.check.overrideCommand config of rust-analyzer.
For example, you can write below config in .vscode/settings.json.
{
"rust-analyzer.check.overrideCommand": [
"cargo",
"check-delta",
"--message-format=json"
]
}