What Is the Minimum Supported Rust Version (MSRV) for RocketMQ-Rust?
RocketMQ-Rust requires Rust 1.85.0 as the minimum supported Rust version, declared in the workspace Cargo.toml and documented in the project's FAQ.
The mxsm/rocketmq-rust repository is a Rust implementation of Apache RocketMQ organized as a multi-crate workspace. Understanding the minimum supported Rust version (MSRV) is critical for contributors integrating the broker, client, or common libraries into their build pipelines.
Where the MSRV Is Declared
The authoritative source for the compiler requirement is the workspace root Cargo.toml. At line 59, the manifest explicitly pins the toolchain floor:
rust-version = "1.85.0"
This field was stabilized in Cargo 1.56 and instructs the compiler to reject any build attempts using older versions. Documentation confirmation appears in the README.md FAQ section (lines 46-50), which states: "The minimum supported Rust version is 1.85.0 (stable or nightly)."
Workspace Inheritance Strategy
RocketMQ-Rust organizes code into inter-dependent crates—including rocketmq-client, rocketmq-broker, and rocketmq-common—under a unified workspace. By defining rust-version once in the root Cargo.toml, all member crates automatically inherit this constraint. Individual component manifests omit the field, centralizing version management and preventing toolchain fragmentation across the monorepo.
Why Rust 1.85.0 Is Required
Setting the floor at 1.85.0 ensures consistent language feature availability across all workspace members. This version threshold guarantees:
- Async/await stability – Unified syntax and standard library improvements introduced through the 1.85 release cycle.
- Build environment consistency – CI pipelines and local development use a single toolchain, eliminating version-skew bugs.
- Clear compatibility boundary – Developers can adopt stabilized features while users know the exact lower bound required to compile.
Verifying Your Toolchain
Before compiling the project, verify your installed Rust version meets the requirement:
rustc --version
The output must report 1.85.0 or higher. If your toolchain is older, update via rustup:
rustup update stable
Attempting to build with an insufficient version produces a clear Cargo error:
error: the crate `rocketmq-client` requires at least rustc 1.85.0
Enforcing the MSRV in Downstream Projects
When embedding RocketMQ-Rust components, declare the same minimum supported Rust version in your application's Cargo.toml to prevent compilation failures:
[package]
name = "my-rocketmq-app"
version = "0.1.0"
edition = "2021"
rust-version = "1.85.0"
[dependencies]
rocketmq-client = { version = "0.8.0", git = "https://github.com/mxsm/rocketmq-rust" }
Running cargo check will fail early if the active toolchain is insufficient, mirroring the upstream repository's strategy and ensuring compatibility with the minimum supported Rust version.
Summary
- The minimum supported Rust version for mxsm/rocketmq-rust is 1.85.0.
- The requirement is defined in the workspace
Cargo.tomlat line 59 via therust-versionfield. - The
README.mdFAQ section (lines 46-50) confirms this requirement applies to both stable and nightly toolchains. - All workspace crates inherit the MSRV automatically, ensuring consistent compilation across
rocketmq-broker,rocketmq-client, and supporting libraries. - Downstream projects should declare
rust-version = "1.85.0"to maintain compatibility.
Frequently Asked Questions
What happens if I try to compile RocketMQ-Rust with Rust 1.84?
Cargo will emit a compiler error stating that the crate requires at least rustc 1.85.0. The build halts immediately before attempting compilation, preventing confusing errors from incompatible language features or standard library APIs.
Does RocketMQ-Rust support nightly toolchains?
Yes, the project explicitly supports nightly toolchains at version 1.85.0 or newer. The MSRV represents the minimum compiler version regardless of the release channel, so any nightly build from 1.85.0 onward is compatible.
Where can I find the MSRV if I don't have the source code open?
Check the project's README.md file in the FAQ section, or inspect the Cargo.toml in the repository root. Both locations declare Rust 1.85.0 as the minimum supported version for the entire workspace.
Do I need to set the MSRV in every crate of my workspace when depending on RocketMQ-Rust?
No. Setting rust-version = "1.85.0" in your own workspace root Cargo.toml is sufficient for your project. The RocketMQ-Rust workspace centralizes its MSRV in the root manifest, which its internal crates inherit automatically; your project only needs to match that constraint to ensure compatibility.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →