blob: 60008bb42c592cae4ede145d5276532599cb4df7 [file] [view]
<!-- Copyright 2026 The Fuchsia Authors
Licensed under a BSD-style license <LICENSE-BSD>, Apache License, Version 2.0
<LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0>, or the MIT
license <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your option.
This file may not be copied, modified, or distributed except according to
those terms. -->
# Developing Anneal
> [!WARNING]
> **Alpha software:** Anneal is an experimental verifier under active
> development and has not yet completed an independent TCB audit. Today's
> default profile checks a pointer-free scalar subset of Rust on x86-64 Linux,
> and automated complete review-surface reporting is still in progress; see
> [How Anneal Earns Your Trust](how-anneal-earns-trust.md),
> [alpha usage](alpha.md), and the [threat model](../THREAT_MODEL.md).
The MIR-based implementation lives at the [repository root](../). See the
[repository layout](architecture.md#repository-layout) for the workspace
structure.
## Build and test the current toolchain
On Linux with Cargo and Nix flakes enabled, run these commands from the
repository root. The archive bundles the pinned Rust and Lean toolchains,
the compiler driver, and Anneal's Lean sources.
```sh
mkdir -p target
nix build .#omnibus-archive --out-link target/omnibus-link
XDG_CACHE_HOME="$(mktemp -d)" \
cargo run --locked -p cargo-anneal -- setup --local-archive target/omnibus-link
```
The command uses a fresh cache because setup reuses an existing installation
for the same version key.
The [MIR verifier alpha](alpha.md) includes an end-to-end scalar example.
See the [scaffold build and testing guide](contributing/scaffolding.md) to run
workspace tests with the pinned toolchain, execute or filter `installed_smoke`
cases, check `cargo-anneal` packaging, and reproduce retained failure bundles.
To audit the checkout, use the `lean/bin/lean` under the installation path
printed by setup. The full MIR correspondence audit uses Linux bubblewrap
at `/usr/bin/bwrap`.
```sh
cargo run --locked -p anneal-audit -- \
--lean /path/to/installed/lean/bin/lean --require-correspondence
```
## CI, releases, and review
- Anneal's
[`CI (PR)`](https://github.com/google/anneal/blob/main/.github/workflows/ci-core-pr.yml)
and
[`CI (Trusted)`](https://github.com/google/anneal/blob/main/.github/workflows/ci-core-trusted.yml)
workflows call the [current verifier
checks](https://github.com/google/anneal/blob/main/ci/checks.toml).
The current checks build and install the archive, audit the trust boundary,
test the Rust workspace, verify the `zerocopy` proof units, and check that
the units whose specifications are written inline have fresh generated
modules; `tools-anneal-spec` lints and tests the untrusted `anneal-spec`
tool against those modules.
- The [release workflows](alpha.md#cut-the-release) prepare and publish
the [Anneal alpha](alpha.md).
- The [Gate 2 review guide](codex-review.md) describes review gates and the
standalone diagnostic evaluator.
## Documentation index
Documents below distinguish between **Current** behavior (what runs in alpha
today) and **Target Architecture** or **Planned Interop** designs landing
incrementally.
### Start here
| Document | Status | Scope |
| :--- | :--- | :--- |
| [Anneal overview](../README.md) | Current | High-level introduction to Anneal, why safe Rust is not enough for `unsafe` code, and how Anneal earns trust. |
| [How Anneal Earns Your Trust](how-anneal-earns-trust.md) | Current | Plain-English assurance model: the four `trusted/` components and external grounding vs. internal checks. |
| [MIR verifier alpha](alpha.md) | Current | Exact Profile v1 scalar subset, experimental Profile v2 slice/raw-pointer subset, `cargo anneal` usage, taint flags, and alpha releases. |
### Governing docs
| Document | Status | Scope |
| :--- | :--- | :--- |
| [Project principles](../PRINCIPLES.md) | Current (governing) | Correctness promise and design principles. |
| [Threat model](../THREAT_MODEL.md) | Current (governing) | Adversary assumptions, bounded two-surface human review, and in-scope defenses. |
| [Meta-principles](../META_PRINCIPLES.md) | Current (governing) | Invariant goals governing principles and threat model. |
| [Agent instructions](../AGENTS.md) | Current | Contributor and AI-agent repository obligations. |
### Audience directories
| Directory | Audience | Contents |
| :--- | :--- | :--- |
| [`guide/`](guide/README.md) | Rust engineers adopting Anneal | Alpha usage ([`alpha.md`](alpha.md)), trust overview, and CLI skill workflows. |
| [`trust/`](trust/README.md) | Security architects & TCB auditors | [`trust-model.md`](trust-model.md), [workspace composition](workspace-composition.md), [elaborator containment](trust/elaborator-containment-design.md), [MIR correspondence](trust/mir-correspondence-design.md), [strategy](mir-correspondence-strategy.md), [`lean-miri` provenance](trust/lean-miri-provenance.md), and [NDJSON comparator](trust/auditing-and-comparator.md) (Target Architecture). |
| [`extending/`](extending/README.md) | Out-of-tree spec & build integrators | [`extensibility-quickstart.md`](extensibility-quickstart.md), [build systems & Receipt v3](extending/build-systems-and-receipts.md) (Target Architecture), and [Anneal–Aeneas bridge](extending/aeneas-interop-bridge.md) (Planned Interop). |
| [`architecture/`](architecture/README.md) | Core verifier & semantics designers | [`design.md`](design.md) (Target vision), [`architecture.md`](architecture.md) (Current + planned), and [Specification Core v2](architecture/spec-core-and-golden-closure.md) (Current + Target Architecture). |
| [`contributing/`](contributing/README.md) | In-tree contributors & review agents | [Scaffolding](contributing/scaffolding.md), [automated red-teaming](red-teaming.md), [`codex-review.md`](codex-review.md), [`review-policy-design.md`](review-policy-design.md), [`rustc-workarounds.md`](rustc-workarounds.md), [two-phase bug management](two-phase-bug-management.md), [performance tracking](contributing/perf-tracking.md), [`anneal-lsp`](contributing/anneal-lsp.md), [`farkas-cert-gen`](contributing/farkas-cert-gen.md), and [testing architecture](contributing/testing-architecture.md) (Target Architecture). |
## Historical workspaces
The earlier [V1 verifier][v1] and [V2 prototype and toolchain][v2] are
available in the repository history with their original build instructions.
[v1]: https://github.com/google/zerocopy/tree/ec75fb464cda7b18581faa83a6a82d0dfdf422d9/anneal/v1
[v2]: https://github.com/google/zerocopy/tree/ec75fb464cda7b18581faa83a6a82d0dfdf422d9/anneal/v2