#cargo #cargo-subcommand #subcommand

app cargo-trend

Cargo subcommand to generate trend graph of dependent crates

10 releases

0.4.0 May 18, 2023
0.3.0 Nov 25, 2020
0.2.5 Jan 21, 2020
0.1.1 Oct 4, 2019

#305 in Cargo plugins

Download history 3/week @ 2024-02-16 4/week @ 2024-02-23 1/week @ 2024-03-01 5/week @ 2024-03-08 2/week @ 2024-03-15 49/week @ 2024-03-29 11/week @ 2024-04-05

60 downloads per month

MIT license

34KB
706 lines

cargo-trend

Actions Status Crates.io

cargo-trend is a cargo subcommand to generate trend graph of dependent crates.

Installation

You can install by cargo.

cargo install cargo-trend

Usage

Type cargo trend only. trend.svg show the trend graph of current project's dependencies.

$ cargo trend

If crate names are given, trend.svg show the trend graph of the given crates.

$ cargo trend failure error-chain quick-error snafu err-derive anyhow thiserror

--output option can specify the filename of the trend graph. The extension can be .svg, .png, .bmp, .jpeg and .jpg.

$ cargo trend --output trend.png

If --relative option is given, the y-axis of the output becomes fraction of crates.io.

If --transitive option is given, the way counting dependents changes from direct-dependencies to transitive-dependencies.

If --top option is given, the most trending crates are shown.

Samples

$ cargo trend --top 5 --duration 4

top5.svg

$ cargo trend --relative --top 5 --duration 4

top5_relative.svg

Error management library

$ cargo trend failure error-chain quick-error snafu err-derive anyhow thiserror

error.svg

$ cargo trend --relative failure error-chain quick-error snafu err-derive anyhow thiserror

error_relative.svg

Argument parser library

$ cargo trend clap structopt docopt argparse getopts

arg.svg

$ cargo trend --relative clap structopt docopt argparse getopts

arg_relative.svg

Terminal library

$ cargo trend ansi_term termcolor term termion colored console

term.svg

$ cargo trend --relative ansi_term termcolor term termion colored console

term_relative.svg

Async runtime library

$ cargo trend tokio smol async-std

async.svg

$ cargo trend --relative tokio smol async-std

async_relative.svg

Database

The database of dependent crates is ./db/db.gz. cargo-trend fetch it from github.com and generate graph. The database is constructed from crates.io-index and updated daily.

Dependencies

~32–50MB
~713K SLoC