cargo-manifest
Rust Cargo.toml
The manifest declares package identity, edition and build inputs. TOML is configuration, not Rust code. Here rust-version declares the intended minimum compiler version, which still needs testing. Example format: toml; run from a disposable copy of v15/fixtures/projects/receipt. Expected result (not executed): Cargo reads the receipt package metadata. Why: The manifest tells Cargo how to interpret the package. Common mistake: Confusing package version 0.1.0 with the compiler version.
Formal Syntax & Structure
rust syntaxrust
[package]; [dependencies]Working Example
Example Snippetrust
[package]name = "receipt"version = "0.1.0"edition = "2024"rust-version = "1.85"publish = false