mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-04-16 21:49:50 +02:00
### Background Comprehensive Rust requires a number of tools to be installed (e.g. mdbook and mdbook-course). As mentioned in #2509 (and discussed in #2469) it would be nice to have a cross platform command for installing these dependencies. Currently these are installed using a shell script (`install-mdbook.sh`) but this isn't truly cross platform e.g. for Windows users. ### Xtask [xtask](https://github.com/matklad/cargo-xtask) outlines an approach for automating tasks in a Rust project. It involves using cargo's aliasing feature to allow us to run commands like `cargo xtask <some task>` to perform adhoc tasks via a Rust binary that we might otherwise need a shell script for. In this PR we add support for a `cargo xtask install-tools` command that will replace the `install-mdbook.sh` script and install the dependent tools. We can potentially extend it to support for other tasks e.g. `cargo xtask fmt`. --------- Co-authored-by: Eric Githinji <egithinji@google.com>