0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

cargo

Posted at

metadata

cargo metadata --no-deps  # 只输出项目自身信息,不包含依赖
cargo metadata --format-version 1  # 指定输出格式版本
cargo metadata --format-version 1 | jq '.packages[] | select(.dependencies[]?.name == "ahash") | .name, .version'

cargo metadata --format-version 1 | jq '.packages[] | select(.dependencies[]?.name == "hashbrown") | .name, .version'

tree

cargo tree -p my_crate  # 只显示指定 crate 的依赖树
cargo tree -i hashbrown  # 反向查询:显示依赖 hashbrown 的所有 crate
cargo tree --duplicates  # 查看重复的依赖(同一 crate 的不同版本)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?