Build
tare build compiles your workspace twice, once with stock Anchor and once with Tare, and leaves both programs side by side.
Synopsis
$ tare build [--manifest-path <path>] [--host]
Run it where you run anchor build. The flags are in Environment.
What it does
- Resolves the workspace’s dependency graph as stock Anchor would, and records it.
- Compiles the program with stock Anchor: the reference,
target/deploy/<program>.so, and its IDL. - Compiles the same source again with Tare’s implementation of the Anchor crates substituted at the dependency level.
- Runs the bytecode stage over the linked Tare program and writes
target/tare/<program>.so. - Restores your Cargo.lock to the bytes it had, or to its absence.
What it prints
Two summary lines end the build:
bytecode: <n> instructions rewritten; <linked> -> <optimized> bytes
<program>: stock <stock> bytes -> tare <tare> bytes
Both programs use the same platform tools, the same architecture and the same profile, so the difference between the two sizes is the framework.
When the build stops
A construct Tare does not implement stops the build with a diagnostic naming the construct and its location. A program builds whole with Tare or it does not build; no part of it falls back to the stock runtime. Compatibility