Dependency substitution
Tare takes the place of the Anchor crates in the dependency graph, so the source it compiles is yours, untouched.
How the substitution is made
Tare reads the workspace’s resolved package graph and presents its own implementation as packages named and versioned exactly like the Anchor packages you depend on. Cargo is given a configuration file on the command line with a source patch for each one:
[patch.crates-io] # Anchor from the registry
[patch."<git URL>"] # Anchor from a git dependency
[patch."file:///<path>"] # Anchor from a path dependencyYour manifests are not edited and your source is not copied, patched or rewritten. It is compiled in place.
Verified before compiling
After patching, a second metadata query checks every anchor-* package in the resolved graph. Each one must point at Tare’s implementation; a single stock framework package left in the graph fails the build. The resolved graph is saved with the artifact.
What stays the same between the two builds
- The platform tools and the SBF architecture.
- The build profile and the workspace’s settings.
- Your source, your features, your other dependencies.
Graphs that are refused
An Anchor version outside the pinned lines, or two versions of one Anchor package in a single graph, stops the build by name.