Skip to content

Commit

Permalink
docs: Update cargo.md (#2680)
Browse files Browse the repository at this point in the history
* Update cargo.md

Added information on how to install using cargo git with mise.

* Add lines around heading
  • Loading branch information
Shobhit0109 authored Sep 28, 2024
1 parent face79b commit f614177
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/dev-tools/backends/cargo.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,23 @@ The version will be set in `~/.config/mise/config.toml` with the following forma
"cargo:eza" = "latest"
```

### Using Git

You can install a any package from a Git repository using the `mise` command. This allows you to install a particular tag, branch, or commit revision:

```sh
# Install a specific tag
mise use cargo:github.com/username/demo@tag:<release_tag>

# Install the latest from a branch
mise use cargo:github.com/username/demo@branch:<branch_name>

# Install a specific commit revision
mise use cargo:github.com/username/demo@rev:<commit_hash>
```

This will execute a `cargo install` command with the corresponding Git options.

## Configuration

Set these with `mise settings set [VARIABLE] [VALUE]` or by setting the environment variable listed.
Expand Down

0 comments on commit f614177

Please sign in to comment.