diff --git a/.cargo/config.toml b/.cargo/config.toml index c0909084..bcfe0c92 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,12 +1,5 @@ [alias] -# 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. diff --git a/README.md b/README.md index 9345895c..5c28c8f2 100644 --- a/README.md +++ b/README.md @@ -71,35 +71,26 @@ Then install these tools with: cargo xtask install-tools ``` +> **Note** We use `xtask` for task automation within the project (e.g. +> installing required tools). Xtask is not a package that you should install. +> Visit https://github.com/matklad/cargo-xtask for more information. + ## Commands -Here is a summary of the various commands you can run in the project. +Here are some of the commonly used commands you can run in the project. Run +`cargo xtask` to view all available commands. -| Command | Description | -| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `cargo install-tools` | Install all the tools the project depends on. | -| `cargo serve` | Start a web server with the course. You'll find the content on http://localhost:3000. To serve any of the translated versions of the course, add the language flag (`--language` or `-l`) followed by xx, where xx is the ISO 639 language code (e.g. `cargo xtask serve -l da` for the Danish translation). | -| `cargo rust-tests` | Test the included Rust snippets. | -| `cargo web-tests` | Run the web driver tests in the tests directory. | -| `cargo build-book` | Create a static version of the course in the `book/` directory. Note that you have to separately build and zip exercises and add them to book/html. To build any of the translated versions of the course, add the language flag (`--language` or `-l`) followed by xx, where xx is the ISO 639 language code (e.g. `cargo xtask build -l da` for the Danish translation). [TRANSLATIONS.md](TRANSLATIONS.md) contains further instructions. | +| Command | Description | +| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `cargo xtask install-tools` | Install all the tools the project depends on. | +| `cargo xtask serve` | Start a web server with the course. You'll find the content on http://localhost:3000. To serve any of the translated versions of the course, add the language flag (--language or -l) followed by xx, where xx is the ISO 639 language code (e.g. cargo xtask serve -l da for the Danish translation). | +| `cargo xtask rust-tests` | Test the included Rust snippets. | +| `cargo xtask web-tests` | Run the web driver tests in the tests directory. | +| `cargo xtask build` | Create a static version of the course in the `book/` directory. Note that you have to separately build and zip exercises and add them to book/html. To build any of the translated versions of the course, add the language flag (--language or -l) followed by xx, where xx is the ISO 639 language code (e.g. cargo xtask build -l da for the Danish translation). [TRANSLATIONS.md](TRANSLATIONS.md) contains further instructions. | > **Note** On Windows, you need to enable symlinks > (`git config --global core.symlinks true`) and Developer Mode. -> **Note** Previous versions this README recommended that you use -> `cargo xtool `, i.e. `cargo xtool install-tools`. This causes issues -> with pre-existing installations of `cargo-xtool` and is now deprecated. -> -> The new syntax is almost a 1:1 mapping, although `cargo xtool build` has -> become `cargo build-book` to avoid conflicting with the built-in Cargo -> subcommand. -> -> - `cargo xtool build` -> `cargo build-book` -> - `cargo xtool install-tools` -> `cargo install-tools` -> - `cargo xtool serve` -> `cargo serve` -> - `cargo xtool run-tests` -> `cargo run-tests` -> - `cargo xtool web-tests` -> `cargo web-tests` - ## Contributing We would like to receive your contributions. Please see