I just launched cargo-vouch, an open-source Rust tool that proves a function can't panic. No tests to write, no annotations to add.
Point it at a .rs file, and it builds a Kani proof harness for every function, then checks every input in bounds. Each function comes back with one of four verdicts:
š“ BUG, with the exact input that triggers the panic
š” UNGUARDED, safe except at type extremes like i32::MAX
š¢ VERIFIED, provably panic-free
ā³ INCONCLUSIVE, when it cannot decide
Why I built it: AI writes Rust that passes cargo test, then panics on an edge input nobody tried. For example, numbers.iter().sum() looks fine until something hands it [i32::MAX, 1].
I ran it on 11 functions GPT-4o wrote and graded. GPT-4o's own grading got 4 of them wrong: it passed three that overflowed and failed one that was fine. cargo-vouch called all four correctly, with the triggering input for each real panic.
The honest limit: it is built for loop-light code. Parsers and loop-heavy functions return INCONCLUSIVE, never a false pass. I would rather say that than oversell it.
If you write Rust, I would like your feedback.
Repo -
https://lnkd.in/eHirVFQq
cargo install cargo-vouch
#rustlang #opensource #formalverification