Rust CLI Cheat Sheet/Pin minimum Rust version

Require a minimum supported compiler version.

Section: Manifest basics

Pin minimum Rust version

toml
toml
[package]
rust-version = "1.75"
Explanation

The manifest supports declaring a minimum supported Rust version.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Manifest basics
Minimal package manifest
Define package metadata and edition.
OpenIn sheettomlsame section
Add a named binary target
Expose an extra executable from the same package.
OpenIn sheettomlsame section
Add dependencies table
Declare crate dependencies in the manifest.
OpenIn sheettomlsame section
Locate the manifest
Print the path to the Cargo.toml file Cargo will use.
OpenIn sheetbash2 tag match
Create a new binary crate
Generate a new package for an executable.
OpenIn sheetbash1 tag match
Show Cargo help
Display top-level help for Cargo.
OpenIn sheetbash1 tag match