killercup / killercup/cargo-edit

add support for editing `.cargo/config`

Open
#75 3 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted new command
Dominant language
Rust
Stars
3.5k
Forks
166
PR merge metrics
No merged PRs in 30d

Description

Quite often during development when I want to test out how changes in a deeper dependency affect a crate, I add that dependency to the `paths` attribute of `.cargo/config`. (and AFAIK that is the only way to achieve that specific override behaviour.

I would propose to use a additional `--override` flag which would then use the following argument as the local path:

``` bash
cargo add --override /my/local/crate
```

I would also understand it if you would prefer a more explicit usage, requiring the `--path` attribute like so:

``` bash
cargo add --override --path=/my/local/crate
```

I don't know what other functionality is provided trough the `.cargo/config` file (and how to integrate them), since that above use case was my primary motivation.

I would love to get some feedback on the command syntax and/or if you would like to have support for editing `.cargo/config` file at all in cargo-edit.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the cargo add command and the .cargo/config paths attribute described in the issue. Clarify whether --override should accept a direct path or require --path, then define the supported configuration behavior and verify that cargo add can update .cargo/config without affecting unrelated settings.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.