I'd like to update a package that I used cargo install
to globally install packages, such as rustfmt or racer. I can't find a way to update an installed package without first deleting it (via cargo uninstall
) and then running the install command again. Is there an update command?
相关问题
- Share Arc between closures
- Function references: expected bound lifetime param
- Pattern matching on slices
- How can I iteratively call Sha256::digest, passing
- Destructure a vector into variables and give away
相关文章
- How can I convert a f64 to f32 and get the closest
- What is a good way of cleaning up after a unit tes
- How can I unpack (destructure) elements from a vec
- How to import macros in Rust?
- How to get struct field names in Rust? [duplicate]
- Confusion between [T] and &[T]
- How do I initialize an opaque C struct when using
- What's the most idiomatic way to test two Opti
A solution I've found is to add the
--force
flag to the install command. For examplecargo install --force clippy
. This will effectively re-install the latest version.There is no such command in vanilla
cargo
(well, there'scargo install
but that's for dependencies), but sincecargo
supports third-party subcommands there is an answer: thecargo-update
crate.Install as usual with
cargo install cargo-update
, then usecargo install-update -a
to update all installed packages, for more usage information and examples see thecargo install-update
manpage.Disclaimer: am author
Nope. You can discuss it in this issue.
The command to update dependencies is
cargo update
Source : http://doc.crates.io/guide.html