Toolchain verifies Rust

Creusot

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

Stage 1 · Usable Auto-active Open source · LGPL-2.1 0.15.0 · 6 days ago
Trust: Checker partial, Semantics partial, Frontend partial, Binary gap weak, Escape hatches partial CheckerSemanticsFrontendBinary gapEscape hatches 0 of 5 strong, 1 weak

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

From your code to an accepted proof. Each step either has to be trusted or is checked by something else.

  1. Input
    Rust code
  2. Front end
    rustc (Creusot runs as a rustc wrapper and reads MIR and THIR) Trusted
  3. Translation
    Creusot translation to Coma (Why3 intermediate language) Trusted Mutable borrows are encoded with prophecies, an approach justified by the RustHornBelt paper (PLDI 2022).
  4. Translation
    Why3 verification-condition generator (driven by Why3find) Trusted
  5. Checker
    Alt-Ergo Trusted
  6. Checker
    Z3 Trusted
  7. Checker
    cvc5 Trusted
  8. Compiler
    rustc / LLVM Trusted

Verified or checked: outside the trusted base Validated per run or by tests Trusted without proof

  • Rust: Mainly safe Rust; some unsafe patterns through ghost permission tokens.

Trust

What a proof from this toolchain relies on: the trusted computing baseTrusted computing base (TCB). Everything that must be correct for a proof to mean what it says., one part at a time. How these are rated.

  1. Checker What has the final word on a proof?
    Partial

    SMT solvers (Alt-Ergo, Z3, cvc5) run through Why3 decide; no proof certificates.

    source

  2. Semantics Is the tool's model of the language the real language?
    Partial

    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

  3. Frontend How does your source get into the model?
    Partial

    rustc compiles the code; Creusot's own unverified translation turns MIR into Coma.

    source

  4. Binary gap Does the proof cover what actually runs?
    Weak

    The binary comes from rustc and LLVM, which are not verified.

  5. Escape hatches Can a proof silently rest on unchecked assumptions?
    Partial

    #[trusted] and #[trusted(...)] skip checks; found by searching the source.

    source

What it can prove

Kinds of guarantees, not how easy they are to get.

Properties
FeatureSupportNotes
No undefined behavior Memory safety and absence of runtime errors: no out-of-bounds access, use-after-free, overflow traps, panics or undefined behavior on any input allowed by the precondition. PartialPartial.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
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
Functional correctness The code meets a written specification of its results, for example “returns the sorted list” or “implements this RFC”. SupportedSupported.Contracts are written in Pearlite, Creusot's specification language.
Source
Contracts are written in Pearlite, Creusot's specification language. source
Equivalence Two programs (an optimized and a reference version, or code before and after a change) are proved to behave the same, or one refines the other. PartialPartial.No dedicated equivalence mode; you write both versions and a contract relating them by hand. No dedicated equivalence mode; you write both versions and a contract relating them by hand.
Information flow Secrets do not influence public outputs, timing or memory access patterns (constant-time code, non-interference). Not supportedNot supported.No documented information-flow or constant-time checking.
Source
No documented information-flow or constant-time checking. source
Concurrency Correctness of code with threads or shared memory: absence of data races, deadlock freedom, linearizability of concurrent data structures. PartialPartial.creusot-std has specifications for threads and atomics and ghost invariants, but the guide does not document concurrent verification yet.
Source
creusot-std has specifications for threads and atomics and ghost invariants, but the guide does not document concurrent verification yet. source
Termination and liveness Every run finishes, or the system keeps making progress (liveness). SupportedSupported.By default Creusot proves partial correctness; adding #[check(terminates)] with variants proves termination. Mutually recursive terminating functions are not supported yet.
Source
By default Creusot proves partial correctness; adding #[check(terminates)] with variants proves termination. Mutually recursive terminating functions are not supported yet. source

Language coverage

Which parts of Rust it handles. Hover or focus a mark for details.

Common features

Common features
FeatureSupportNotes
Machine integers Fixed-width integer arithmetic, overflow and bit operations. SupportedSupported.Machine integers with overflow checks.
Source
Machine integers with overflow checks. source
Floating point IEEE 754 floating-point arithmetic, including rounding and NaNs. PartialPartial.Basic float comparisons appear in the tests, but the test file carries a FIXME note saying that all of it should work.
Source
Basic float comparisons appear in the tests, but the test file carries a FIXME note saying that all of it should work. source
Heap and pointers Dynamically allocated memory, pointers or references, and aliasing. SupportedSupported.Box and references are supported; raw pointers need ghost permission tokens (see unsafe).
Source
Box and references are supported; raw pointers need ghost permission tokens (see unsafe). source
Arrays and buffers Indexed memory such as arrays, slices, vectors and byte buffers. SupportedSupported.Vec and slices have specifications. The standard vec! macro is not supported; use the replacement in creusot-std.
Source
Vec and slices have specifications. The standard vec! macro is not supported; use the replacement in creusot-std. source
Loops Unbounded loops, which need invariants or bounds to verify. SupportedSupported.Loop invariants; variants for termination.
Source
Loop invariants; variants for termination. source
Recursion Functions that call themselves, directly or through others. SupportedSupported.Terminating recursive functions need a variant; mutual recursion is not supported for them.
Source
Terminating recursive functions need a variant; mutual recursion is not supported for them. source
Higher-order code Function pointers, closures and callbacks. SupportedSupported.Closures, including ones with mutable captures, are covered by the test suite.
Source
Closures, including ones with mutable captures, are covered by the test suite. source
Threads and shared memory Concurrent threads with locks, atomics or message passing. PartialPartial.Specifications for threads and atomics exist in creusot-std; not yet covered by the guide.
Source
Specifications for threads and atomics exist in creusot-std; not yet covered by the guide. source
I/O and system calls Files, network, system calls and foreign-function calls. UnknownUnknown.creusot-std has an io module, but its coverage is not documented.
Source
creusot-std has an io module, but its coverage is not documented. source
Standard library Specifications or models for the language's standard library. PartialPartial.creusot-std specifies parts of std (Vec, HashMap, Option, iterators, cells, threads and more), not all of it.
Source
creusot-std specifies parts of std (Vec, HashMap, Option, iterators, cells, threads and more), not all of it. source

Rust-specific features

Rust-specific features
FeatureSupportNotes
References and borrowing Shared and mutable references checked by the borrow checker. SupportedSupported.Mutable borrows are modeled with prophecies (the value at the end of the borrow).
Source
Mutable borrows are modeled with prophecies (the value at the end of the borrow). source
Traits and generics Generic functions and types with trait bounds. SupportedSupported.Traits with logical contracts are supported; recursive traits are rejected because they could make proofs unsound.
Source
Traits with logical contracts are supported; recursive traits are rejected because they could make proofs unsound. source
Closures Anonymous functions that capture their environment. SupportedSupported.
Source
source
unsafe and raw pointers Code inside unsafe blocks, raw pointer dereferences and FFI. PartialPartial.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
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
Interior mutability Cell, RefCell, UnsafeCell and other mutation through shared references. PartialPartial.creusot-std provides cells with ghost permissions (PCell, PredCell) and a specification of std's cell module.
Source
creusot-std provides cells with ghost permissions (PCell, PredCell) and a specification of std's cell module. source
Trait objects dyn Trait values with dynamic dispatch. PartialPartial.Only some traits may be used as dyn Trait, to avoid an unsoundness shown in the test suite.
Source
Only some traits may be used as dyn Trait, to avoid an unsoundness shown in the test suite. source
Iterators Iterator chains such as map, filter and for loops over collections. SupportedSupported.creusot-std specifies the Iterator trait and common adapters (map, filter, zip, enumerate and others).
Source
creusot-std specifies the Iterator trait and common adapters (map, filter, zip, enumerate and others). source
Panics Panicking operations (unwrap, indexing, overflow in debug builds) and their absence. SupportedSupported.Absence of panics is proved, except Vec capacity overflow (see no-ub).
Source
Absence of panics is proved, except Vec capacity overflow (see no-ub). source
async / await Asynchronous functions and futures. UnknownUnknown.Not mentioned in the guide. Not mentioned in the guide.

Stage

Computed from the evidence below; see the criteria. 1criterion is missing for Stage 2.

Stage 0 Research Met
  • Met: Publicly available evidence
  • Met: At least one published verification uses it ICFEM 2022 paper; the CreuSAT SAT solver was also verified with Creusot. evidence
Stage 1 Usable Met
  • Met: Released or updated in the last 12 months Latest release: 0.15.0, 2026-11-20. evidence
  • Met: Installs and runs on current platforms Installed from source with an INSTALL script (needs rustup and opam); releases are tagged. evidence
  • Met: User documentation or tutorial evidence
  • Met: Used by a group other than its authors CreuSAT, a verified SAT solver, and the Krabka Kafka broker are listed in the README as projects built with Creusot. evidence
Stage 2 Production Next
  • Not met: Verified code in production at two or more independent organizations None recorded.
  • Met: Checker axis is not red
  • Met: Semantics axis is not red
  • Met: Public channel for soundness bugs Public GitHub issues with a "soundness" label. evidence

In use

Verified code in production, and notable verification projects.

Facts and sources

Effort
Auto-active: You write specifications and hints; a solver does the proving.
Licence
Open source, LGPL-2.1
Maintained by
Laboratoire Méthodes Formelles
Latest release
0.15.0 (20 Nov 2026) source
Last checked
26 Nov 2026

Further sources

esc