What Are the Rust Edition and MSRV for OpenLogi?
OpenLogi uses Rust edition 2024 with a Minimum Supported Rust Version (MSRV) of 1.98, defined centrally in the workspace Cargo.toml.
OpenLogi is a Rust-based project that requires specific compiler guarantees to ensure consistent builds across all crates in its workspace. Understanding the Rust edition and MSRV for OpenLogi is essential for contributors and developers integrating with the codebase. These values are declared at the workspace level, applying uniformly to every package within the repository.
Workspace Configuration for Edition and MSRV
The authoritative source for version requirements is the workspace root Cargo.toml. According to the AprilNEA/OpenLogi source code, line 30 specifies the edition and line 36 sets the minimum compiler version:
[workspace.package]
edition = "2024"
rust-version = "1.98"
This configuration ensures that all crates inherit Rust edition 2024 and MSRV 1.98 unless explicitly overridden. The edition field controls language features and idioms available to the compiler, while rust-version enforces the minimum supported Rust version, preventing compilation on older toolchains.
Toolchain Pinning in rust-toolchain.toml
Beyond the manifest settings, OpenLogi pins the exact toolchain in rust-toolchain.toml. This file ensures that developers use a consistent compiler version that matches the MSRV requirements.
[toolchain]
channel = "1.98.0"
By committing this file to version control, the project guarantees that rustup automatically selects the correct toolchain, eliminating "works on my machine" discrepancies.
Verifying Your Local Toolchain
Before building OpenLogi, verify that your installed Rust version meets the MSRV 1.98 requirement:
# Check current rustc version (must be >= 1.98)
rustc --version
# Verify the project will compile
cargo check
If your compiler is older than 1.98, cargo check will fail with an error indicating the package requires a newer Rust version.
Implications for Crate Development
When adding new crates to the OpenLogi workspace, you should reference the workspace defaults rather than hardcoding values:
[package]
name = "my-new-crate"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
This inheritance pattern ensures that when the Rust edition and MSRV for OpenLogi are updated in the future, all workspace members automatically adopt the new requirements without manual edits to individual Cargo.toml files.
Summary
- OpenLogi targets Rust edition 2024 and MSRV 1.98 as defined in the root
Cargo.toml - Line 30 sets
edition = "2024"and line 36 setsrust-version = "1.98"in the workspace manifest - The
rust-toolchain.tomlpins toolchain 1.98.0 to maintain developer environment consistency - All workspace crates inherit these settings via
edition.workspace = trueandrust-version.workspace = true - Run
rustc --versionto verify your local compiler meets the 1.98 minimum before building
Frequently Asked Questions
What is the current MSRV for OpenLogi?
The current Minimum Supported Rust Version for OpenLogi is 1.98, specified in the [workspace.package] section of the root Cargo.toml at line 36. This guarantees the project compiles on stable Rust toolchains released from version 1.98 onward.
Which Rust edition does OpenLogi use?
OpenLogi uses Rust edition 2024, declared in the workspace Cargo.toml at line 30. This edition setting applies to all crates in the workspace unless explicitly overridden in an individual package manifest.
How does OpenLogi enforce the MSRV during compilation?
The MSRV is enforced via the rust-version field in Cargo.toml. When running cargo check or cargo build, Cargo compares this value against the active compiler version. If the local rustc is older than 1.98, the build system emits a hard error preventing compilation.
Where is the Rust toolchain version pinned in the repository?
The toolchain is pinned in rust-toolchain.toml at the repository root, which specifies channel = "1.98.0". This file ensures all contributors automatically use the correct compiler version via rustup, aligning development environments with the project's MSRV requirements.
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 →