From: Patrick Steinhardt Date: Wed, 15 Oct 2025 06:04:04 GMT Subject: [PATCH v3 0/6] ci: improvements to our Rust infrastructure Message-ID: <20251015-b4-pks-ci-rust-v3-0-13810af33bd5@pks.im> In-Reply-To: <20251007-b4-pks-ci-rust-v1-0-394502abe7ea@pks.im> Hi, this small patch series introduces some improvements for our Rust infrastructure. Most importantly, it introduces a couple of static analysis checks to verify consistent formatting, use Clippy for linting and to verify our minimum supported Rust version. Furthermore, this series also introduces support for building with Rust enabled on Windows. The series is built on top of 45547b60ac (Merge branch 'master' of https://github.com/j6t/gitk, 2025-10-05) with ps/rust-balloon at e425c40aa0 (ci: enable Rust for breaking-changes jobs, 2025-10-02) and ps/gitlab-ci-windows-improvements at 3c4925c3f5 (t8020: fix test failure due to indeterministic tag sorting, 2025-10-02) merged into it. Changes in v3: - Clarify why scripts don't use `set -e` exclusively for error handling. - Link to v2: https://lore.kernel.org/r/20251008-b4-pks-ci-rust-v2-0-d556ee83c381@pks.im Changes in v2: - Adjust comments for `encode_varint()` and `decode_varint()` based on brian's feedback. - Some small improvements to commit messages. - Not changed is the default column limit used by Rust. I think using the column limit of 100 used by the Rust ecosystem is sensible, but if there is a majority advocating for a limit of 80 I'll adapt this. - Link to v1: https://lore.kernel.org/r/20251007-b4-pks-ci-rust-v1-0-394502abe7ea@pks.im Thanks! Patrick --- Patrick Steinhardt (6): ci: deduplicate calls to `apt-get update` ci: check formatting of our Rust code rust/varint: add safety comments ci: check for common Rust mistakes via Clippy ci: verify minimum supported Rust version rust: support for Windows .github/workflows/main.yml | 15 +++++++++++++++ .gitlab-ci.yml | 13 ++++++++++++- Cargo.toml | 1 + Makefile | 14 ++++++++++++-- ci/install-dependencies.sh | 17 +++++++++++++---- ci/run-rust-checks.sh | 22 ++++++++++++++++++++++ meson.build | 4 ++++ src/cargo-meson.sh | 11 +++++++++-- src/varint.rs | 15 +++++++++++++++ 9 files changed, 103 insertions(+), 9 deletions(-) Range-diff versus v2: 1: dc9d75f47c = 1: cac74c6387 ci: deduplicate calls to `apt-get update` 2: 8537190491 ! 2: 6164bbd971 ci: check formatting of our Rust code @@ Commit message edition is automatically derived from the edition we have specified in our "Cargo.toml" file. + The implemented script looks somewhat weird as we perfom manual error + handling instead of using something like `set -e`. The intent here is + that subsequent commits will add more checks, and we want to execute all + of these checks regardless of whether or not a previous check failed. + Signed-off-by: Patrick Steinhardt ## .github/workflows/main.yml ## 3: 8f7232e650 = 3: 1c87940646 rust/varint: add safety comments 4: 09810edff2 = 4: 0b09774307 ci: check for common Rust mistakes via Clippy 5: bdb4e9df32 = 5: 93d6111ae7 ci: verify minimum supported Rust version 6: 40edae19a8 = 6: 3f58a9b9df rust: support for Windows --- base-commit: 8c8e270f2aba359479c4c2b4ab3c62726e5dac9d change-id: 20251007-b4-pks-ci-rust-8422e6a8196e