1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-10-09 19:12:06 +02:00
Commit Graph

20 Commits

Author SHA1 Message Date
dependabot[bot]
7b022bb4e9 cargo: bump the patch group with 10 updates (#2940)
Bumps the patch group with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.99` | `1.0.100` |
| [clap](https://github.com/clap-rs/clap) | `4.5.47` | `4.5.48` |
| [regex](https://github.com/rust-lang/regex) | `1.11.2` | `1.11.3` |
| [serde](https://github.com/serde-rs/serde) | `1.0.219` | `1.0.228` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.143` | `1.0.145`
|
| [zerocopy](https://github.com/google/zerocopy) | `0.8.26` | `0.8.27` |
| [tokio-websockets](https://github.com/Gelbpunkt/tokio-websockets) |
`0.12.1` | `0.12.3` |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.16` |
`2.0.17` |
| [cxx](https://github.com/dtolnay/cxx) | `1.0.175` | `1.0.180` |
| [cxx-build](https://github.com/dtolnay/cxx) | `1.0.175` | `1.0.186` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-06 09:51:38 +00:00
michael-kerscher
f4a11a4fc5 Speed up rust crate installs in workflow by using cargo-binstall (#2915)
When cargo xtask install-tools --binstall is used, precompiled binaries
are fetched if available.
Triggers a regular (compilation) install if binary releases do not
exist.

This is now configured to be used by the CI to speed up the build and
deploy workflows where possible.

Currently binary packages exist for:
- mdbook
- mdbook-pandoc
2025-09-19 13:28:03 +02:00
michael-kerscher
33bc3f4088 refactor cargo xtasks (#2907)
* improve error handling
* show executed command lines
* reduce code duplication (run_command, run_mdbook_command)
2025-09-18 23:48:15 +02:00
Martin Geisler
a9497bdc61 Update mdbook to version 0.4.52 (#2870)
The most significant change for users is that the search index is
downloaded on demand.

For us as a project, it’s good to see the server used by `mdbook serve`
change from `warp` to `asum`: the former hadn’t been updated in a while,
leading us to have old dependencies in our `Cargo.lock`.

I also ran `cargo update` to further unify the versions of our
dependencies. This shrunk `cargo tree --duplicates` a little more.

---------

Co-authored-by: Michael Kerscher <kerscher@google.com>
2025-09-15 14:25:15 +02:00
Luciefer
4731acf53f ci: use pinned nightly rustfmt to make unstable features take effect (#2896)
## What does this PR do?

This PR extends the existing `format` job in
`.github/workflows/build.yml` to
**check Rust formatting with nightly `rustfmt`**:

**Closes #2794**
2025-09-10 13:36:47 +02:00
dependabot[bot]
7339c04b9c cargo: bump the patch group with 8 updates (#2862)
Bumps the patch group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.98` | `1.0.99` |
| [clap](https://github.com/clap-rs/clap) | `4.5.42` | `4.5.46` |
| [regex](https://github.com/rust-lang/regex) | `1.11.1` | `1.11.2` |
| [serde_json](https://github.com/serde-rs/json) | `1.0.142` | `1.0.143`
|
| [tokio](https://github.com/tokio-rs/tokio) | `1.47.0` | `1.47.1` |
| [tokio-websockets](https://github.com/Gelbpunkt/tokio-websockets) |
`0.12.0` | `0.12.1` |
| [reqwest](https://github.com/seanmonstar/reqwest) | `0.12.22` |
`0.12.23` |
| [thiserror](https://github.com/dtolnay/thiserror) | `2.0.12` |
`2.0.16` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-09-01 13:05:20 +01:00
Eric Githinji
301170f17e Uninstall old mdbook-linkcheck while installing project tools. (#2846)
Fixes #2773 .
2025-08-13 10:15:53 +03:00
dependabot[bot]
426f3f783a cargo: bump the patch group with 3 updates (#2837)
Bumps the patch group with 3 updates:
[clap](https://github.com/clap-rs/clap),
[serde_json](https://github.com/serde-rs/json) and
[reqwest](https://github.com/seanmonstar/reqwest).
2025-08-02 12:17:06 -04:00
Eric Githinji
570a726cb5 Add xtask support for refresh slide list. (#2774)
Adds support for a `refresh-slide-list` argument when running the
command `cargo xtask web-tests`. Allows one to also specify an optional
book html directory **if** one uses the `refresh-slide-list` argument.
Fixes #2744 .
2025-08-01 11:07:19 +03:00
Eric Githinji
5fc5893fbf 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>
2025-07-31 12:54:26 +03:00
dependabot[bot]
6194ac4abb cargo: bump the patch group with 4 updates (#2795)
Bumps the patch group with 4 updates:
[clap](https://github.com/clap-rs/clap),
[googletest](https://github.com/google/googletest-rust),
[zerocopy](https://github.com/google/zerocopy) and
[reqwest](https://github.com/seanmonstar/reqwest).

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-01 11:01:37 +01:00
dependabot[bot]
1a2081765e cargo: bump the patch group with 4 updates (#2758)
Bumps the patch group with 4 updates:
[clap](https://github.com/clap-rs/clap),
[mdbook](https://github.com/rust-lang/mdBook),
[googletest](https://github.com/google/googletest-rust) and
[reqwest](https://github.com/seanmonstar/reqwest).
2025-06-01 15:30:29 -04:00
Andrew Walbran
a0e1add083 Add more tools to install instructions. (#2756)
Install mdbook-linkcheck2 via xtask, rather than separate step.
2025-05-23 21:16:57 +01:00
Andrew Walbran
fc6e5c7526 Update to Rust 2024 edition. (#2658) 2025-05-23 19:03:03 +01:00
Eric Githinji
738d5ad820 Simplify project commands using cargo xtask (#2753)
We are already using `cargo xtask install-tools` to install the
project's tools, and `cargo xtask web-tests` to run the js tests. In
this PR we provide support for the various `mdbook` commands
(`test`,`serve`, and `build`) with `cargo xtask` commands. This provides
a uniform interface for running tasks in the project. Additionally it
allows these commands to work from within any dirrectory (previously
you'd need to navigate to the workspace root in order to run say `mdbook
build`).

Additionally we're improving the xtask code by making use of `Clap`
enums to handle validation of the possible tasks to run via xtask (this
closes #2741 ).

---------

Co-authored-by: Eric Githinji <egithinji@google.com>
2025-05-21 09:58:52 +03:00
Eric Githinji
6da4ade59e Add xtask command for running web-tests. (#2743)
Currently, to run the tests that are located in the `tests` directory
(the js tests), one has to navigate to the directory and run `npm test`
or `npm start`. We now have a way of automating such task execution
using the binary in the `xtask` directory. This pr makes use of this by
introducing a new command `cargo xtask web-tests` that can be run from
anywhere in the repo to run the tests in the `tests` directory.

---------

Co-authored-by: Eric Githinji <egithinji@google.com>
2025-05-07 12:31:08 +03:00
Eric Githinji
291c2b08e3 Make install-tools command work from any directory in the workspace. (#2725)
This fixes #2708 by creating a CARGO_WORKSPACE_DIR env variable to act
as an anchor path, allowing the installation of mdbook-exerciser and
mdbook-course to succeed from any directory within the repository. Based
on the approach mentioned here:
https://github.com/rust-lang/cargo/issues/3946#issuecomment-973132993

---------

Co-authored-by: Eric Githinji <egithinji@google.com>
2025-05-06 09:55:55 +03:00
dependabot[bot]
53afa8416b cargo: bump the patch group with 6 updates (#2731)
Bumps the patch group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [anyhow](https://github.com/dtolnay/anyhow) | `1.0.97` | `1.0.98` |
| [clap](https://github.com/clap-rs/clap) | `4.5.35` | `4.5.37` |
| [zerocopy](https://github.com/google/zerocopy) | `0.8.24` | `0.8.25` |
| [tokio-websockets](https://github.com/Gelbpunkt/tokio-websockets) |
`0.11.3` | `0.11.4` |
| [cxx](https://github.com/dtolnay/cxx) | `1.0.153` | `1.0.158` |
| [cxx-build](https://github.com/dtolnay/cxx) | `1.0.153` | `1.0.158` |

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-05-01 11:45:05 +01:00
Eric Githinji
0085748d17 Xtask improvements (#2707)
Some minor improvements to an already-merged PR (#2688) on the task
automation via xtask. Main ones being:

- Adding more explanatory comments about what the xtask package is and
what it does
- Using Clap for CLI arg parsing
- Using Anyhow for error handling

---------

Co-authored-by: Eric Githinji <egithinji@google.com>
2025-04-07 12:18:49 +02:00
Eric Githinji
91f6de64df Xtask (#2688)
### 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>
2025-03-14 12:24:08 +01:00