cargo-manifest

Rust Local path dependencies

Use local packages while developing related code. Paths are relative to the manifest containing the dependency declaration. If a version is also supplied, it must match the local package. Example format: toml; run from a disposable copy of v15/fixtures/projects/local-app. Expected result (not executed): cargo run --offline --quiet prints 15. Why: The local-app binary calls price::subtotal from the local library. Common mistake: Thinking a use statement alone makes another package available.

Formal Syntax & Structure

rust syntaxrust
name = { path = "relative/path", version = "0.1" }

Working Example

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