# What Is the Minimum Supported Rust Version (MSRV) for RocketMQ-Rust?

> Discover the minimum supported Rust version MSRV for RocketMQ-Rust. Learn about the required Rust 1.85.0 for this powerful client library. Check the repo now.

- Repository: [mxsm/rocketmq-rust](https://github.com/mxsm/rocketmq-rust)
- Tags: getting-started
- Published: 2026-03-07

---

**RocketMQ-Rust requires Rust 1.85.0 as the minimum supported Rust version, declared in the workspace [`Cargo.toml`](https://github.com/mxsm/rocketmq-rust/blob/main/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`](https://github.com/mxsm/rocketmq-rust/blob/main/Cargo.toml). At line 59, the manifest explicitly pins the toolchain floor:

```toml
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`](https://github.com/mxsm/rocketmq-rust/blob/main/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`](https://github.com/mxsm/rocketmq-rust/blob/main/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:

```bash
rustc --version

```

The output must report `1.85.0` or higher. If your toolchain is older, update via rustup:

```bash
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`](https://github.com/mxsm/rocketmq-rust/blob/main/Cargo.toml) to prevent compilation failures:

```toml
[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.toml`](https://github.com/mxsm/rocketmq-rust/blob/main/Cargo.toml) at **line 59** via the `rust-version` field.
- The [`README.md`](https://github.com/mxsm/rocketmq-rust/blob/main/README.md) FAQ 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`](https://github.com/mxsm/rocketmq-rust/blob/main/README.md) file in the FAQ section, or inspect the [`Cargo.toml`](https://github.com/mxsm/rocketmq-rust/blob/main/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`](https://github.com/mxsm/rocketmq-rust/blob/main/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.