cargo-*: add short/long options (#21442)

This commit is contained in:
Nelson Figueroa
2026-03-09 22:52:40 -07:00
committed by GitHub
parent 164e014c59
commit d83e7ec146
12 changed files with 24 additions and 24 deletions
+3 -3
View File
@@ -10,11 +10,11 @@
- 최적화를 통해 릴리스 모드에서 아티팩트 빌드:
`cargo rustc --release`
`cargo rustc {{[-r|--release]}}`
- 현재 CPU에 대한 아키텍처별 최적화로 컴파일:
`cargo rustc --release -- -C target-cpu=native`
`cargo rustc {{[-r|--release]}} -- -C target-cpu=native`
- 속도 최적화로 컴파일:
@@ -30,7 +30,7 @@
- 특정 패키지 빌드:
`cargo rustc --package {{패키지}}`
`cargo rustc {{[-p|--package]}} {{패키지}}`
- 지정된 바이너리만 빌드:
+3 -3
View File
@@ -21,15 +21,15 @@
- Executa verificações para um grupo de validadores (veja <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>):
`cargo clippy -- --warn clippy::{{grupo_de_validadores}}`
`cargo clippy -- {{[-W|--warn]}} clippy::{{grupo_de_validadores}}`
- Executa validações tratando avisos como erros:
`cargo clippy -- --deny warnings`
`cargo clippy -- {{[-D|--deny]}} warnings`
- Executa verificações e ignora avisos:
`cargo clippy -- --allow warnings`
`cargo clippy -- {{[-A|--allow]}} warnings`
- Aplica automaticamente as sugestões do Clippy:
+3 -3
View File
@@ -9,11 +9,11 @@
- Compila os artefatos em modo de publicação (release), com otimizações:
`cargo rustc --release`
`cargo rustc {{[-r|--release]}}`
- Compila com otimizações específicas para a arquitetura do CPU atual:
`cargo rustc --release -- -C target-cpu=native`
`cargo rustc {{[-r|--release]}} -- -C target-cpu=native`
- Compila com otimização de velocidade:
@@ -29,7 +29,7 @@
- Compila um pacote específico:
`cargo rustc --package {{pacote}}`
`cargo rustc {{[-p|--package]}} {{pacote}}`
- Compila apenas o binário especificado:
+1 -1
View File
@@ -13,7 +13,7 @@
- 删除 release 模式的构建产物 (`target/release` 目录)
`cargo clean --release`
`cargo clean {{[-r|--release]}}`
- 删除给定配置文件的目录中的构建产物(在本例中为 `target/debug`)
+3 -3
View File
@@ -21,15 +21,15 @@
- 运行特定 lint 组的检查(参见 <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>):
`cargo clippy -- --warn clippy::{{lint组}}`
`cargo clippy -- {{[-W|--warn]}} clippy::{{lint组}}`
- 将警告视为错误:
`cargo clippy -- --deny warnings`
`cargo clippy -- {{[-D|--deny]}} warnings`
- 运行检查并忽略警告:
`cargo clippy -- --allow warnings`
`cargo clippy -- {{[-A|--allow]}} warnings`
- 自动应用 Clippy 的建议:
+3 -3
View File
@@ -5,15 +5,15 @@
- 邀请指定的用户或团队作为所有者:
`cargo owner --add {{用户名|github:机构名称:团队名称}} {{包名}}`
`cargo owner {{[-a|--add]}} {{用户名|github:机构名称:团队名称}} {{包名}}`
- 将指定的用户或团队从所有者中删除:
`cargo owner --remove {{用户名|github:机构名称:团队名称}} {{包名}}`
`cargo owner {{[-r|--remove]}} {{用户名|github:机构名称:团队名称}} {{包名}}`
- 列出一个包的所有者:
`cargo owner --list {{包名}}`
`cargo owner {{[-l|--list]}} {{包名}}`
- 使用指定的注册表 (注册表名称可以在配置中定义,默认为 <https://crates.io>)
+1 -1
View File
@@ -10,4 +10,4 @@
- 显示将包含在tarball中的文件,而不实际创建它:
`cargo package --list`
`cargo package {{[-l|--list]}}`
+1 -1
View File
@@ -10,7 +10,7 @@
- 执行检查,创建一个 `.crate` 文件,但不上传它 (相当于 `cargo package`)
`cargo publish --dry-run`
`cargo publish {{[-n|--dry-run]}}`
- 使用指定的注册表 (注册表名称可以在配置中定义,默认为 <https://crates.io>)
+3 -3
View File
@@ -10,11 +10,11 @@
- 在 release 模式下构建构建,启用优化:
`cargo rustc --release`
`cargo rustc {{[-r|--release]}}`
- 使用针对当前 CPU 的特定架构优化编译:
`cargo rustc --release -- -C target-cpu=native`
`cargo rustc {{[-r|--release]}} -- -C target-cpu=native`
- 使用速度优化编译:
@@ -30,7 +30,7 @@
- 构建特定的包:
`cargo rustc --package {{package}}`
`cargo rustc {{[-p|--package]}} {{package}}`
- 仅构建指定的二进制文件:
+1 -1
View File
@@ -22,4 +22,4 @@
- 仅显示 normal/build/dev 依赖:
`cargo tree --edges {{normal|build|dev}}`
`cargo tree {{[-e|--edges]}} {{normal|build|dev}}`
+1 -1
View File
@@ -9,7 +9,7 @@
- 显示将会更新的内容,但实际上不写入锁定文件:
`cargo update --dry-run`
`cargo update {{[-n|--dry-run]}}`
- 仅更新指定的依赖项:
+1 -1
View File
@@ -9,4 +9,4 @@
- 显示额外的构建信息:
`cargo version --verbose`
`cargo version {{[-v|--verbose]}}`