Repository navigation
THRIFT-6162: Require Rust 1.85 with the 2024 edition and build with Rust 1.99 - #4003
Merged
Merged
Conversation
…ust 1.99 Client: rs All Rust crates declare edition 2024 and rust-version 1.85. Edition 2024 turns on Cargo's MSRV-aware resolver, so dependencies resolve to versions that still build on 1.85 even when a newer toolchain runs the build. CI, the crates.io release and the Docker images use Rust 1.99.0, pinned rather than "stable": the Rust jobs run clippy with -D warnings, and each new release adds lints. Bump the pin on purpose, together with any lint fixes it needs. The generated ok_or() now matches with if-let instead of is_some() and unwrap(), which clippy 1.99 rejects in every generated client.
slachiewicz
requested review from
Jens-G,
fishy,
jimexist and
mhlakhani
as code owners
October 12, 2026 20:50
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The edition migration misses the new gen keyword, and CI no longer validates the declared Rust 1.85 minimum.
2 open findings
What changed in this PR
Raises Rust support to edition 2024 with Rust 1.85 as the minimum, while pinning builds and releases to Rust 1.99.
Changes:
- Updates Rust crates, compatibility documentation, and configure checks.
- Pins CI, release workflows, and Docker images to Rust 1.99.
- Updates generated and handwritten Rust code for current clippy/rustfmt behavior.
| File | Description |
|---|---|
tutorial/rs/src/bin/tutorial_server.rs |
Refactors optional operand handling. |
tutorial/rs/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
test/rs/src/bin/test_server.rs |
Applies clippy and import cleanups. |
test/rs/src/bin/test_client.rs |
Applies clippy and import cleanups. |
test/rs/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
rust-toolchain |
Pins Rust 1.99.0. |
lib/rs/tests/tls.rs |
Reorders imports. |
lib/rs/tests/shared_channel.rs |
Reorders imports. |
lib/rs/test/fuzz/fuzz_targets/roundtrip_compact.rs |
Reorders imports. |
lib/rs/test/fuzz/fuzz_targets/roundtrip_binary.rs |
Reorders imports. |
lib/rs/test/fuzz/fuzz_targets/parse_compact.rs |
Reorders imports. |
lib/rs/test/fuzz/fuzz_targets/parse_binary.rs |
Reorders imports. |
lib/rs/test/fuzz/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
lib/rs/test/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
lib/rs/test_recursive/src/lib.rs |
Reorders imports. |
lib/rs/test_recursive/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
lib/rs/src/transport/tls.rs |
Reorders imports. |
lib/rs/src/transport/socket.rs |
Reorders imports. |
lib/rs/src/server/multiplexed.rs |
Applies formatting and clippy fixes. |
lib/rs/src/server/mod.rs |
Applies Rust 1.99 formatting. |
lib/rs/src/protocol/mod.rs |
Removes needless borrowing and reformats. |
lib/rs/src/protocol/compact.rs |
Applies Rust 1.99 formatting. |
lib/rs/src/protocol/binary.rs |
Applies formatting and clippy fixes. |
lib/rs/README.md |
Documents the new Rust compatibility policy. |
lib/rs/Cargo.toml |
Sets edition 2024 and Rust 1.85. |
LANGUAGES.md |
Updates supported and tested Rust versions. |
doc/thrift-threat-model.md |
Updates the documented Rust baseline. |
configure.ac |
Requires rustc 1.85 or newer. |
compiler/cpp/src/thrift/generate/t_rs_generator.cc |
Replaces generated unwraps with pattern matching. |
build/docker/ubuntu-noble/Dockerfile |
Installs Rust 1.99.0. |
build/docker/ubuntu-jammy/Dockerfile |
Installs Rust 1.99.0. |
build/docker/README.md |
Documents the Docker Rust version. |
.github/workflows/release_rust.yml |
Pins publishing to Rust 1.99.0. |
.github/workflows/build.yml |
Pins Rust CI to 1.99.0. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| name = "thrift" | ||
| description = "Rust bindings for the Apache Thrift RPC system" | ||
| edition = "2021" | ||
| edition = "2024" |
| timeout-minutes: 60 | ||
| env: | ||
| TOOLCHAIN_VERSION: 1.85.1 | ||
| TOOLCHAIN_VERSION: 1.99.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Moves the Rust crates to the 2024 edition with
rust-version = "1.85", and pins CI, release and Docker to Rust 1.99.0. The pin is notstablebecause clippy runs with-D warnings. The generator change replacesis_some()/unwrap()inok_or(), which clippy 1.99 rejects in every generated client. This makes the.cargo/config.tomlfrom #4002 redundant.Verified: lib-rust CI steps on 1.85.1 and 1.99.0 → pass; rs↔rs cross test → 0 of 48 failed.