4 releases

0.2.0 Mar 5, 2025
0.1.0 Jan 20, 2025
0.1.0-rc.1 Dec 17, 2024
0.1.0-pre.1 Jun 18, 2024
0.1.0-alpha.1 Oct 7, 2024

#114 in Procedural macros

Download history 655/week @ 2024-12-13 141/week @ 2024-12-20 38/week @ 2024-12-27 370/week @ 2025-01-03 484/week @ 2025-01-10 691/week @ 2025-01-17 506/week @ 2025-01-24 771/week @ 2025-01-31 659/week @ 2025-02-07 349/week @ 2025-02-14 575/week @ 2025-02-21 885/week @ 2025-02-28 1752/week @ 2025-03-07 2151/week @ 2025-03-14 1668/week @ 2025-03-21 1993/week @ 2025-03-28

7,734 downloads per month
Used in 9 crates (4 directly)

Apache-2.0

28KB
612 lines

hax library

This crate contains helpers that can be used when writing Rust code that is proven through the hax toolchain.

⚠️ The code in this crate has no effect when compiled without the --cfg hax.

Examples:

fn sum(x: Vec<u32>, y: Vec<u32>) -> Vec<u32> {
  hax_lib::assume!(x.len() == y.len());
  hax_lib::assert!(hax_lib::forall(|i: usize| hax_lib::implies(i < x.len(), || x[i] < 4242)));
  hax_lib::debug_assert!(hax_lib::exists(|i: usize| hax_lib::implies(i < x.len(), || x[i] > 123)));
  x.into_iter().zip(y.into_iter()).map(|(x, y)| x + y).collect()
}

Dependencies

~0–390KB