cargo-manifest
Cargo source replacement
Use source replacement when an equivalent copy of an existing source is required, such as a reviewed vendor directory. It is not a mechanism to substitute modified library code; use a patch when changing the actual dependency. Example format: toml. Illustrative only; do not execute against real accounts or unreviewed sources. Expected result (not executed): An existing complete vendor directory would supply matching dependencies. This fragment does not create that directory. Common mistake: Using source replacement to silently alter library behavior.
Formal Syntax & Structure
rust syntaxrust
[source.NAME] replace-with = "replacement"Working Example
Example Snippetrust
[source.crates-io]replace-with = "reviewed-vendor"[source.reviewed-vendor]directory = "vendor"