Files
tldr/pages.zh/common/cargo-metadata.md
Beriholic 33770df77d cargo*: add Chinese translation (#12312)
* cargo-*: add Chinese translation

---------

Co-authored-by: Jack Lin <blueskyson1401@gmail.com>
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com>
2024-03-14 10:25:45 +05:30

22 lines
751 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# cargo metadata
> 以 JSON 格式输出当前包的工作空间成员和已解析的依赖关系。
> 注意:输出格式可能在未来的 Cargo 版本中发生变化。
> 更多信息:<https://doc.rust-lang.org/cargo/commands/cargo-metadata.html>.
- 打印当前包的工作空间成员和已解析的依赖关系:
`cargo metadata`
- 仅打印工作空间成员,不获取依赖项:
`cargo metadata --no-deps`
- 根据指定版本打印特定格式的元数据:
`cargo metadata --format-version {{版本号}}`
- 打印带有 `resolve` 字段的元数据,仅包括给定目标三元组的依赖关系 (注意:`packages` 数组仍将包括所有目标的依赖关系)
`cargo metadata --filter-platform {{目标三元组}}`