hax from pereq
A Rust verification tool that translates a large subset of Rust into formal languages such as Lean, F*, and Rocq.
At a Glance
hax core tool released under the Apache License 2.0, free to use, modify and distribute.
Engagement
Available On
Alternatives
Listed Dec 2026
About hax from pereq
hax is an open-source verification tool, published by the pereq under the Apache-2.0 license, for high assurance translation of a large subset of Rust into formal languages. It runs as a cargo subcommand and targets proof assistants including Lean, F* and Rocq, plus cryptography-oriented backends such as ProVerif, SSProve and EasyCrypt. The latest release listed is cargo-hax-v0.5.0.
What It Is
hax lets Rust developers extract their crates into the input languages of formal verification tools so that properties of the code can be proved there. It is invoked as cargo hax, with subcommands to translate a crate to a chosen backend, run proof scenarios declared in a hax.toml file, export the typed AST of a crate as JSON, and manage external tools such as Charon and Aeneas.
Backends and Verification Workflow
The README lists the Lean backend (via Aeneas) as under active development, F* as stable, and Rocq, ProVerif, SSProve and EasyCrypt as experimental. The Lean backend uses the Charon and Aeneas pipeline and downloads pre-built binaries on demand. The manual includes Lean and F* quick starts and tutorials covering panic freedom and proving properties, and F* also has a tutorial on data invariants. A browser playground allows trying hax without installing it.
Supported Rust Subset
hax aims to support full Rust, with one documented exception: mutable references (&mut T) are forbidden on return types and when aliasing. Unsupported features are tracked as GitHub issues labeled unsupported-rust.
Setup Path
hax is supported on Linux (x86_64 and aarch64) and macOS (aarch64); Windows users should use WSL. It can be installed with cargo install --locked cargo-hax, with cargo-binstall, from a repository checkout, via Nix, or with Docker. Target provers such as Lean and F* must be installed separately. The F*, Rocq, ProVerif, SSProve, EasyCrypt and legacy Lean backends also need the hax frontend driver and engine, which the manual installation, Nix and Docker methods provide.
Collections
Popular collections
- Give Your Agent Design Taste
Collection by @linetwk
- Run YOLO Mode Without Risking Your Laptop
Collection by @reproalex
- ADE List - December 2026
Collection by @mateorivera17
- UI Design Skills for Coding Agents
Collection by @mayachen
Add hax from pereq to one of your collections.
Community Discussions
Be the first to start a conversation about hax from pereq
Share your experience with hax from pereq, ask questions, or help others learn from your insights.
Pricing
Open Source
hax core tool released under the Apache License 2.0, free to use, modify and distribute.
- License: Apache License 2.0 (Apache-2.0)
- Translates a large subset of Rust into Lean, F*, Rocq and other formal languages
- Browser playground available
- Community support via Zulip and GitHub Discussions
Capabilities
Key Features
- Translates a large subset of Rust into Lean, F*, and Rocq
- Backends for ProVerif, SSProve and EasyCrypt
- Cargo subcommand: into, extract, json, tools
- Proof scenarios declared in hax.toml
- Typed AST export as JSON
- Managed Charon and Aeneas tool versions
- Browser-based playground
- Manual with Lean and F* tutorials
