Skip to content

mrcodechef/kani

 
 

Kani Rust Verifier

The Kani Rust Verifier aims to be a bit-precise model-checker for Rust. Kani ensures that unsafe Rust code is actually safe, and verifies that safe Rust code will not panic at runtime.

Installing Kani

Until an official release is out, you can read documentation on how to check out and build Kani yourself.

What can Kani do?

Our documentation covers:

How does Kani work?

You write a proof harness that looks a lot like a test harness, except that you can check all possible values using kani::any():

use my_crate::{function_under_test, is_valid, meets_specification};

#[kani::proof]
fn check_my_property() {
   let input = kani::any();
   kani::assume(is_valid(input));
   let output = function_under_test(input);
   assert!(meets_specification(input, output));
}

Kani will then prove that all valid inputs will produce acceptable outputs, without panicking or executing undefined behavior. You can learn more about how to use Kani by following the Kani tutorial.

Security

See SECURITY for more information.

Developer guide

See Kani developer documentation.

License

Kani

Kani is distributed under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE and LICENSE-MIT for details.

Rust compiler

Kani contains code from the Rust compiler. The rust compiler is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See the Rust repository for details.

About

Kani Rust Verifier

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 88.1%
  • JavaScript 4.8%
  • CSS 3.2%
  • Python 1.5%
  • C 0.7%
  • Shell 0.6%
  • Other 1.1%