1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-08-08 08:22:52 +02:00

Provide shorter Cargo aliases for xtool subcommands (#2804)

This change deprecates the use of `cargo xtask <tool>` in favor of
dedicated aliases for each tool.

| Proposed | Current |
|----------|---------|
| `cargo install-tools` |  `cargo xtask install-tools` |
| `cargo web-tests` |  `cargo xtask web-tests` |
| `cargo rust-tests` |  `cargo xtask rust-tests` |
| `cargo serve` |  `cargo xtask serve` |
| `cargo build-book` |  `cargo xtask build` |

_Note_: Because `build` is a pre-existing Cargo sub-command, I've
proposed `cargo build-book` as a strawman.


Fixes #2803
This commit is contained in:
Tim McNamara
2025-07-06 05:44:47 +12:00
committed by GitHub
parent 010b443615
commit 7c23d3bcf8
2 changed files with 28 additions and 9 deletions

View File

@ -1,7 +1,12 @@
[alias]
# We use this alias for task automation in the project.
# See README in xtask directory.
# WARNING: Using the `xtask` alias is deprecated and will be unsupported in a
# future version of Cargo. See https://github.com/rust-lang/cargo/issues/10049.
xtask = "run --package xtask --"
install-tools = "run --package xtask -- install-tools"
web-tests = "run --package xtask -- web-tests"
rust-tests = "run --package xtask -- rust-tests"
serve = "run --package xtask -- serve"
build-book = "run --package xtask -- build"
[env]
# To provide an anchor to the root of the workspace when working with paths.