# Creusot

> Annotate Rust functions with contracts; Creusot translates the code to Why3, whose SMT solvers prove absence of panics and that the contracts hold.

- Kind: toolchain
- Verifies: Rust (Mainly safe Rust; some unsafe patterns through ghost permission tokens.)
- Effort: Auto-active — You write specifications and hints; a solver does the proving.
- Stage: 1 (Usable)
- Trust: Checker partial, Semantics partial, Frontend partial, Binary gap weak, Escape hatches partial
- Licence: open-source, LGPL-2.1
- Latest release: 0.15.0 (2026-11-20) https://github.com/creusot-rs/creusot/releases/tag/v0.15.0
- Links: [homepage](https://creusot.rs), [repo](https://github.com/creusot-rs/creusot), [docs](https://guide.creusot.rs), [paper](https://hal.inria.fr/hal-03737878/file/main.pdf), [tutorial](https://github.com/creusot-rs/tutorial)

## Use it if
- You write safe Rust and want proofs that it does not panic or overflow and meets its contracts.
- Your code uses mutable borrows, traits, closures or iterators heavily; Creusot has specific support for these.
- You are comfortable writing loop invariants and occasional lemmas.

## Look elsewhere if
- You need the proof checked by a small proof kernel; Creusot trusts SMT solvers.
- Your code is mainly async or relies on unsafe code outside the patterns Creusot's ghost permissions cover.
- You need termination by default; total correctness is opt-in per function.

## How it works (pipeline)

| Step | Component | Assurance | Note |
|---|---|---|---|
| frontend | rustc (Creusot runs as a rustc wrapper and reads MIR and THIR) | trusted |  |
| translation | Creusot translation to Coma (Why3 intermediate language) | trusted | Mutable borrows are encoded with prophecies, an approach justified by the RustHornBelt paper (PLDI 2022). |
| translation | Why3 verification-condition generator (driven by Why3find) | trusted |  |
| checker | Alt-Ergo | trusted |  |
| checker | Z3 (`z3`) | trusted |  |
| checker | cvc5 (`cvc5`) | trusted |  |
| compiler | rustc / LLVM | trusted |  |

## Trust

| Axis | Level | Summary | Note |
|---|---|---|---|
| Checker | Partial (amber) | SMT solvers (Alt-Ergo, Z3, cvc5) run through Why3 decide; no proof certificates. |  [source](https://guide.creusot.rs/installation.html) |
| Semantics | Partial (amber) | Rust model built into Creusot's translation; no published validation against rustc. | The prophecy encoding of mutable borrows has a foundational justification in RustHornBelt (PLDI 2022), which is a proof about the method, not about the tool. [source](https://doi.org/10.1145/3519939.3523704) |
| Frontend | Partial (amber) | rustc compiles the code; Creusot's own unverified translation turns MIR into Coma. |  [source](https://github.com/creusot-rs/creusot/blob/master/ARCHITECTURE.md) |
| Binary gap | Weak (red) | The binary comes from rustc and LLVM, which are not verified. |  |
| Escape hatches | Partial (amber) | #[trusted] and #[trusted(...)] skip checks; found by searching the source. |  [source](https://guide.creusot.rs/trusted.html) |

## What it can prove

| Property | Support |
|---|---|
| No undefined behavior | Partial — Proves code free of panics, overflows and assertion failures. A known gap stated in the guide is that Vec methods that grow the vector can panic on capacity overflow, which the current contracts do not rule out. ([source](https://guide.creusot.rs/limitations.html)) |
| Functional correctness | Supported — Contracts are written in Pearlite, Creusot's specification language. ([source](https://guide.creusot.rs)) |
| Equivalence | Partial — No dedicated equivalence mode; you write both versions and a contract relating them by hand. |
| Information flow | Not supported — No documented information-flow or constant-time checking. ([source](https://guide.creusot.rs)) |
| Concurrency | Partial — creusot-std has specifications for threads and atomics and ghost invariants, but the guide does not document concurrent verification yet. ([source](https://github.com/creusot-rs/creusot/blob/master/creusot-std/src/std/thread.rs)) |
| Termination and liveness | Supported — By default Creusot proves partial correctness; adding #[check(terminates)] with variants proves termination. Mutually recursive terminating functions are not supported yet. ([source](https://guide.creusot.rs/termination.html)) |

## Common features

| Feature | Support |
|---|---|
| Machine integers | Supported — Machine integers with overflow checks. ([source](https://github.com/creusot-rs/creusot/blob/master/README.md)) |
| Floating point | Partial — Basic float comparisons appear in the tests, but the test file carries a FIXME note saying that all of it should work. ([source](https://github.com/creusot-rs/creusot/blob/master/tests/should_succeed/lang/float_ops.rs)) |
| Heap and pointers | Supported — Box and references are supported; raw pointers need ghost permission tokens (see unsafe). ([source](https://guide.creusot.rs/tutorial/linked_list.html)) |
| Arrays and buffers | Supported — Vec and slices have specifications. The standard vec! macro is not supported; use the replacement in creusot-std. ([source](https://guide.creusot.rs/limitations.html)) |
| Loops | Supported — Loop invariants; variants for termination. ([source](https://guide.creusot.rs/basic_concepts/loop_invariants.html)) |
| Recursion | Supported — Terminating recursive functions need a variant; mutual recursion is not supported for them. ([source](https://guide.creusot.rs/termination.html)) |
| Higher-order code | Supported — Closures, including ones with mutable captures, are covered by the test suite. ([source](https://github.com/creusot-rs/creusot/tree/master/tests/should_succeed/closures)) |
| Threads and shared memory | Partial — Specifications for threads and atomics exist in creusot-std; not yet covered by the guide. ([source](https://github.com/creusot-rs/creusot/tree/master/creusot-std/src)) |
| I/O and system calls | Unknown — creusot-std has an io module, but its coverage is not documented. ([source](https://github.com/creusot-rs/creusot/tree/master/creusot-std/src)) |
| Standard library | Partial — creusot-std specifies parts of std (Vec, HashMap, Option, iterators, cells, threads and more), not all of it. ([source](https://doc.creusot.rs/creusot_std/)) |

## Rust-specific features

| Feature | Support |
|---|---|
| References and borrowing | Supported — Mutable borrows are modeled with prophecies (the value at the end of the borrow). ([source](https://guide.creusot.rs/representation_of_types/mutable_borrows.html)) |
| Traits and generics | Supported — Traits with logical contracts are supported; recursive traits are rejected because they could make proofs unsound. ([source](https://guide.creusot.rs/termination.html)) |
| Closures | Supported ([source](https://github.com/creusot-rs/creusot/tree/master/tests/should_succeed/closures)) |
| unsafe and raw pointers | Partial — Raw pointers can be used with ghost permission tokens (Perm), as in the guide's linked-list tutorial; other unsafe code is not covered. ([source](https://guide.creusot.rs/tutorial/linked_list.html)) |
| Interior mutability | Partial — creusot-std provides cells with ghost permissions (PCell, PredCell) and a specification of std's cell module. ([source](https://github.com/creusot-rs/creusot/tree/master/creusot-std/src)) |
| Trait objects | Partial — Only some traits may be used as dyn Trait, to avoid an unsoundness shown in the test suite. ([source](https://github.com/creusot-rs/creusot/blob/master/tests/should_fail/unsound_dyn.rs)) |
| Iterators | Supported — creusot-std specifies the Iterator trait and common adapters (map, filter, zip, enumerate and others). ([source](https://github.com/creusot-rs/creusot/tree/master/creusot-std/src)) |
| Panics | Supported — Absence of panics is proved, except Vec capacity overflow (see no-ub). ([source](https://guide.creusot.rs/limitations.html)) |
| async / await | Unknown — Not mentioned in the guide. |

## Stage

**Stage 1: Usable.**

| Stage | Criterion | Met | Evidence / note |
|---|---|---|---|
| 0 | Publicly available | yes | [evidence](https://github.com/creusot-rs/creusot) |
| 0 | At least one published verification uses it | yes | [evidence](https://hal.inria.fr/hal-03737878/file/main.pdf) ICFEM 2022 paper; the CreuSAT SAT solver was also verified with Creusot. |
| 1 | Released or updated in the last 12 months | yes | [evidence](https://github.com/creusot-rs/creusot/releases/tag/v0.15.0) Latest release: 0.15.0, 2026-11-20. |
| 1 | Installs and runs on current platforms | yes | [evidence](https://guide.creusot.rs/installation.html) Installed from source with an INSTALL script (needs rustup and opam); releases are tagged. |
| 1 | User documentation or tutorial | yes | [evidence](https://guide.creusot.rs) |
| 1 | Used by a group other than its authors | yes | [evidence](https://github.com/sarsko/CreuSAT) CreuSAT, a verified SAT solver, and the Krabka Kafka broker are listed in the README as projects built with Creusot. |
| 2 | Verified code in production at two or more independent organizations | no | None recorded. |
| 2 | Checker axis is not red | yes |  |
| 2 | Semantics axis is not red | yes |  |
| 2 | Public channel for soundness bugs | yes | [evidence](https://github.com/creusot-rs/creusot/issues?q=label%3Asoundness) Public GitHub issues with a "soundness" label. |

Missing for Stage 2: Verified code in production at two or more independent organizations.

## Projects
- [CreuSAT verified SAT solver](https://github.com/sarsko/CreuSAT)
- [Krabka Kafka-compatible broker (key safety algorithms)](https://github.com/krabka-io/krabka-broker)

## Sources
- [Creusot README](https://github.com/creusot-rs/creusot/blob/master/README.md)
- [Creusot known limitations](https://guide.creusot.rs/limitations.html)
- [Creusot termination](https://guide.creusot.rs/termination.html)
- [Creusot trusted marker](https://guide.creusot.rs/trusted.html)
- [Creusot architecture](https://github.com/creusot-rs/creusot/blob/master/ARCHITECTURE.md)
- [Creusot devlog](https://devlog.creusot.rs)

---
Last checked 2026-11-26. Data: [JSON](/toolchains/creusot.json) · Page: [HTML](/toolchains/creusot/) · Methodology v0.1: [/methodology/](/methodology/) · Corrections: [/contribute/](/contribute/)
