百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
P

prusti-dev

> 数据库
开源

一个用于 Rust 的静态验证器,基于 Viper 验证基础架构。

1.8K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个用于 Rust 的静态验证器,基于 Viper 验证基础架构。

Prusti

Prusti is a prototype verifier for Rust that makes it possible to formally prove absence of bugs and correctness of code contracts. Internally, Prusti builds upon the Viper verification infrastructure.

By default Prusti verifies absence of integer overflows and panics, proving that statements such as unreachable!() and panic!() are unreachable. Overflow checking can be disabled with a configuration flag, treating all integers as unbounded. In Prusti, the functional behaviour of functions and external libraries can be specified by using annotations, among which are preconditions, postconditions, and loop invariants. The tool checks them, reporting error messages when the code does not adhere to the provided specification.

Useful links

  • :computer: VS Code extension to use Prusti from your IDE.
  • :book: User guide, containing installation instructions, a guided tutorial and a description of various verification features.
  • :woman_technologist: Developer guide, intended for new contributors. If you want to help, check our good first issues.
  • :books: List of publications. To cite the Prusti verifier, please use this BibTeX entry.
  • :film_projector: Presentation of Prusti's research project. It includes a demo.
  • :balance_scale: License of the source code (Mozilla Public License Version 2.0, for code authored by us).
  • :speech_balloon: Do you still have questions? Open an issue or contact us on the Zulip chat.

Getting Prusti

The easiest way to try out Prusti is by using the "Prusti Assistant" extension for VS Code. See the requirements and the troubleshooting section in its readme.

Alternatively, if you wish to use Prusti from the command line there are three options:

  • Download the precompiled binaries for Ubuntu, Windows, or macOS from a GitHub release.
  • Compile from the source code, by installing rustup, running ./x.py setup and then ./x.py build --release.
  • (unmaintained) Build a Docker image from this Dockerfile.

All three options provide the prusti-rustc and cargo-prusti programs that can be used analogously to, respectively, rustc and cargo build. For more detailed instructions, refer to the guides linked above.

Quick example

  1. Take the following program:
…
  1. Run Prusti. You get the following error:
    error: [Prusti: verification error] assertion might fail with "attempt to add with overflow"
      --> example.rs:12:15
       |
    12 |     let mid = (low + high) / 2;
       |               ^^^^^^^^^^^^
    
    Verification failed
    
  2. Fix the buggy line with let mid = low + ((high - low) / 2);
  3. Run Prusti. Now the bisect function verifies.

Congratulations! You just proved absence of panics and integer overflows in the bisect function. To additionally prove that the result is correct (i.e. such that f(x) == target), see this example.

GitHub Issues· 0 开放

在 GitHub 查看全部

暂无开放 Issues,或尚未同步最近议题。

核心特点

  • •:computer: VS Code extension to use Prusti from your IDE.
  • •:book: User guide, containing installation instructions, a guided tutorial and a description of various verification features.
  • •:woman_technologist: Developer guide, intended for new contributors. If you want to help, check our good first issues.
  • •:books: List of publications. To cite the Prusti verifier, please use this BibTeX entry.
  • •:film_projector: Presentation of Prusti's research project. It includes a demo.
  • •:balance_scale: License of the source code (Mozilla Public License Version 2.0, for code authored by us).
  • •:speech_balloon: Do you still have questions? Open an issue or contact us on the Zulip chat.
  • •Download the precompiled binaries for Ubuntu, Windows, or macOS from a GitHub release.
  • •Compile from the source code, by installing rustup, running ./x.py setup and then ./x.py build --release.
  • •(unmaintained) Build a Docker image from this Dockerfile.

> 标签

Rustformal-verificationrustverificationviper

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库