/proc-assertions

A solution for verifying your code through procedural assumptions in Rust.

Primary LanguageRustMIT LicenseMIT

proc-assertions

Verify at compile-time your code via procedural assumptions in Rust; developed by Efficient Computing Lab. Find previous commits for the crate v.0.1.1 here.

Installation

This crate is available on crates.io and can be used by adding the following to your project's Cargo.toml:

[dependencies]
proc_assertions = "0.1.1"

and this to your crate root (main.rs or lib.rs):

#[macro_use]
extern crate proc_assertions;

Usage

This crate exposes the following proc-macros:

  • #[calls]
  • #[nocalls]
  • #[mutates]
  • #[nomutates]
  • #[private_fields]
  • #[size_align]
  • #[consumes]

FAQ

  • Q: How can I contribute? Contributions are welcome via pull requests to the GitHub repository.
  • Q: Will this affect my compiled binary? No, these assertions are only used at compile-time and don't affect the final binary.
  • Q: Will this affect my compile times? There may be a slight increase in compile times due to additional checks.

License

This project is licensed under the MIT License.