cargo-manifest

Rust Development dependencies

Place test-only helper libraries in dev-dependencies so normal library consumers do not need them for a standard build. Test targets may import these helpers. Example format: toml; run from a disposable copy of v15/fixtures/projects/dev-app. Expected result (not executed): cargo test --offline passes the doubled integration test. Why: The test accesses helper while the library itself only doubles a number. Common mistake: Importing a dev-only dependency in ordinary library code.

Formal Syntax & Structure

rust syntaxrust
[dev-dependencies]

Working Example

Example Snippetrust
[dev-dependencies]helper = { path = "helper" }
Rust Reference