git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/6] ci: improvements to our Rust infrastructure

From
Patrick Steinhardt <ps@pks.im>
Date
Oct 8, 2025, 06:27 UTC
Message-ID
<20251008-b4-pks-ci-rust-v2-0-d556ee83c381@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 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 v1:
1:  26bd2c3713 ! 1:  fa3ba52997 ci: deduplicate calls to `apt-get update`
    @@ Commit message
         only required to perform job-specific tasks.
     
         In both steps we use `apt-get update` to update our repository sources.
    -    This is unecessary though: all platforms that use Aptitude would have
    +    This is unnecessary though: all platforms that use Aptitude would have
         already executed this command in the distro-specific step anyway.
     
         Drop the redundant calls.
2:  5116c20fd1 ! 2:  89e7b67d5c ci: check formatting of our Rust code
    @@ Commit message
         ci: check formatting of our Rust code
     
         Introduce a CI check that verifies that our Rust code is well-formatted.
    -    This check uses rustfmt(1), which is the de-facto standard in the Rust
    -    world.
    +    This check uses `cargo fmt`, which is a wrapper around rustfmt(1) that
    +    executes formatting for all Rust source files. rustfmt(1) itself is the
    +    de-facto standard for formatting code in the Rust ecosystem.
     
         The rustfmt(1) tool allows to tweak the final format in theory. In
         practice though, the Rust ecosystem has aligned on style "editions".
3:  5b4c3303b7 < -:  ---------- rust/varint: add safety comments
-:  ---------- > 3:  3c91ec55dc rust/varint: add safety comments
4:  68925b41c0 = 4:  481500d7b8 ci: check for common Rust mistakes via Clippy
5:  c3f0943066 = 5:  09e73796ec ci: verify minimum supported Rust version
6:  0f968950a8 = 6:  acd460fac5 rust: support for Windows

--- base-commit: 8c8e270f2aba359479c4c2b4ab3c62726e5dac9d change-id: 20251007-b4-pks-ci-rust-8422e6a8196e

Next: Patrick Steinhardt
Message 1 of 9 in “ci: improvements to our Rust infrastructure”
  1. 0/6 ci: improvements to our Rust infrastructurePatrick Steinhardt, Oct 8, 2025
  2. 1/6 ci: deduplicate calls to `apt-get update`Patrick Steinhardt, Oct 8, 2025
  3. 2/6 ci: check formatting of our Rust codePatrick Steinhardt, Oct 8, 2025
  4. 3/6 rust/varint: add safety commentsPatrick Steinhardt, Oct 8, 2025
  5. 4/6 ci: check for common Rust mistakes via ClippyPatrick Steinhardt, Oct 8, 2025
  6. 5/6 ci: verify minimum supported Rust versionPatrick Steinhardt, Oct 8, 2025
  7. 6/6 rust: support for WindowsPatrick Steinhardt, Oct 8, 2025
  8. Patrick SteinhardtOct 8, 2025
  9. Junio C HamanoOct 9, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.