You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-08-09 00:36:37 +02:00
Support setting language and output directory in cargo xtask (#2776)
In addition to simplifying building locally (no need to set an environment variable), this makes it possible to use the `cargo xtask build` command in the CI and specify any output location, rather than relying on the build.sh script. --------- Co-authored-by: Eric Githinji <egithinji@google.com>
This commit is contained in:
14
README.md
14
README.md
@ -75,13 +75,13 @@ cargo xtask install-tools
|
||||
|
||||
Here is a summary of the various commands you can run in the project.
|
||||
|
||||
| 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. |
|
||||
| `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, run MDBOOK_BOOK__LANGUAGE=xx mdbook build -d book/xx where xx is the ISO 639 language code (e.g. da for the Danish translation). [TRANSLATIONS.md](TRANSLATIONS.md) contains further instructions. |
|
||||
| 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. |
|
||||
|
||||
> **Note** On Windows, you need to enable symlinks
|
||||
> (`git config --global core.symlinks true`) and Developer Mode.
|
||||
|
Reference in New Issue
Block a user