From 8c35c6148b4a29d50b55f1b064045e611fc5aa9b Mon Sep 17 00:00:00 2001 From: Frederick Zhang Date: Fri, 6 Oct 2017 18:32:51 +1100 Subject: [PATCH] docs: briefly explains how `cargo-outdated` works --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index c6a5400..c59a392 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,14 @@ A cargo subcommand for displaying when Rust dependencies are out of date `cargo-outdated` is for displaying when dependencies have newer versions available. +## How it works + +The functionality of `cargo-outdated` largely depends on the `cargo` builtin command `cargo update`. + +To retrieve the list of available SemVer compatible dependencies, `cargo-outdated` firstly creates a temporary workspace, then executes `cargo update` against it, finally compares the temporary dependency tree with the original one. + +Similarly, to check the latest dependencies, `cargo-outdated` replaces the SemVer requirements of *direct* dependencies with wildcards then goes through the same process. + ## Demo Once installed (see below) running `cargo outdated` in a project directory looks like the following: