| Crates.io | cargo-certora-sbf |
| lib.rs | cargo-certora-sbf |
| version | 0.3.2 |
| created_at | 2025-04-04 20:33:14.36761+00 |
| updated_at | 2025-04-29 18:18:50.448323+00 |
| description | Build a program for Certora Verification using Certora's version of Solana Platform Tools |
| homepage | https://www.certora.com |
| repository | https://github.com/Certora/cargo-certora-sbf |
| max_upload_size | |
| id | 1620714 |
| size | 123,916 |
A Cargo subcommand that integrates Certora formal verification into Rust-based Solana BPF (SBF) smart contract development workflows.
cargo-certora-sbf itselfInstall via cargo install:
cargo install cargo-certora-sbf
Ensure you have Rust installed using rustup. cargo-certora-sbf requires Rust version 1.81 or higher.
Use from the command line just like any other cargo subcommand:
cargo certora-sbf [OPTIONS]
Run cargo certora-sbf --help for the full list of options.
cargo-certora-sbf automates:
How to resolve the error "... cannot be built because it requires rustc 1.79.0 or newer"
This error typically occurs when you intend to use Solana v1.18, but cargo decided to use Solana v2 or above. This usually happens when Rust with version >v1.75 is used to configure the project to create or update Cargo.lock. This, in turn, most often happens by rust-analyzer in VSCode automatically configuring the project when it is first opened.
To resolve, first undo by restoring or removing Cargo.lock. Then, configure using Rust v1.75. For example, simply running
cargo certora-sbf
should work.
To investigate further, run check subcommand manually (but use Rust v1.75!)
cargo +1.75 check
How to use cargo-certora-sbf with projects that require Solana v2 (that require Rust v1.79)
This requires platform-tools version v1.43 or above. Use
cargo certora-sbf --tools-version v1.43
If you get an error message like below:
error: not a directory: '/Users/some_user/.local/share/solana/install/active_release/bin/sdk/sbf/dependencies/platform-tools-certora/rust/bin'
[ERROR] execution of "rustup" terminated with exit status: 1
try reinstalling via cargo certora-sbf --no-build --force-tools-install.
Is it possible to install platform tools without building a rust project.
Yes. Use the following command line flags:
cargo certora-sbf --no-build --force-tools-install
Something is not working, how to get more information on what is going on?
Enable extra verbosity by using -vv flag.
Apache 2.0. See LICENSE for details.
Issues, pull requests, and feedback are welcome!
βΈ»
Made with β€οΈ by Arie Gurfinkel for Certora