Skip to content

Rust standard library verification

Rust TestsBuild Book

This repository is a fork of the official Rust programming language repository, created solely to verify the Rust standard library. It should not be used as an alternative to the official Rust releases. The repository is tool agnostic and welcomes the addition of new tools. The currently accepted tools are Flux, GOTO Transcoder (ESBMC), Kani, and VeriFast.

The goal is to have a verified Rust standard library and prove that it is safe.

  1. Contributing to the core mechanism of verifying the rust standard library
  2. Creating new techniques to perform scalable verification
  3. Apply techniques to verify previously unverified parts of the standard library.

For that we are launching a contest supported by the Rust Foundation that includes a series of challenges that focus on verifying memory safety and a subset of undefined behaviors in the Rust standard library. Each challenge describes the goal, the success criteria, and whether it has a financial award to be awarded upon its successful completion.

These are the challenges:

ChallengeRewardStatusProof
1: Verify core transmuting methods10,000 USDResolvedKani
2: Verify the memory safety of core intrinsics using raw pointers10,000 USDOpen
3: Verifying Raw Pointer Arithmetic OperationsN/AResolvedKani
4: Memory safety of BTreeMap's btree::node module10,000 USDOpen
5: Verify functions iterating over inductive data type: linked_list20,000 USDResolvedVeriFast
6: Safety of NonNullN/AResolvedKani
7: Safety of Methods for Atomic Types & Atomic Intrinsics10,000 USDOpen
8: Contracts for SmallSort10,000 USDOpen
9: Safe abstractions for core::time::DurationN/AResolvedKani
10: Memory safety of String10,000 USDOpen
11: Safety of Methods for Numeric Primitive TypesN/AResolvedKani
12: Safety of NonZero10,000 USDOpen
13: Safety of CStr10,000 USDOpen
14: Safety of Primitive ConversionsTBDResolvedKani
15: Contracts and Tests for SIMD Intrinsics20,000 USDOpen
16: Verify the safety of Iterator functions10,000 USDOpen
17: Verify the safety of slice functions10,000 USDOpen
18: Verify the safety of slice iter functions10,000 USDOpen
19: Safety of RawVec10,000 USDResolvedVeriFast
20: Verify the safety of char-related functions in str::pattern25,000 USDOpen
21: Verify the safety of substring-related functions in str::pattern25,000 USDOpen
22: Verify the safety of str iter functions10,000 USDOpen
23: Verify the safety of Vec functions part 115,000 USDOpen
24: Verify the safety of Vec functions part 215,000 USDOpen
25: Verify the safety of VecDeque functions10,000 USDOpen
26: Verify reference-counted Cell implementation10,000 USDOpen
27: Verify atomically reference-counted Cell implementation10,000 USDOpen

See our book for more details on the challenge rules.

We welcome everyone to participate!

Contact

For questions, suggestions or feedback, feel free to open an issue here.

Security

See SECURITY for more information.

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

Rust 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.

Introducing a New Tool

Please use the template available in this repository to introduce a new verification tool.

About

Verifying the Rust standard library

Resources

Code of conduct

Contributing

Security policy

Stars

347 stars

Watchers

11 watching

Forks

Releases

Packages

Used by

Contributors

Languages