cargo-manifest

Rust Dependency version requirements

A version requirement describes acceptable releases, not necessarily the exact version selected. A bare 1.2.3 is a caret requirement, allowing compatible versions up to but not including 2.0.0; =1.2.3 restricts selection to that exact version. Pre-release selection has additional rules. Example format: toml; run from a disposable copy of v15/fixtures/projects/local-app. Expected result (not executed): Local price 0.1.0 satisfies the requirement; 0.2.0 does not. Why: For 0.1, the compatible range ends before 0.2.0. Common mistake: Assuming all 0.x releases are mutually compatible.

Formal Syntax & Structure

rust syntaxrust
version = "1.2.3"; version = "=1.2.3"

Working Example

Example Snippetrust
[dependencies]price = { path = "price", version = "0.1" }
Rust Reference