proc_assertions

Crates.ioproc_assertions
lib.rsproc_assertions
version0.1.1
sourcesrc
created_at2024-10-19 06:37:41.814309
updated_at2024-10-19 06:44:20.881606
descriptionCompile-time assertions via procedural macros.
homepagehttps://github.com/anton-mel/proc-assertions
repositoryhttps://github.com/anton-mel/proc-assertions
max_upload_size
id1415119
size39,527
Anton Melnychuk (anton-mel)

documentation

https://docs.rs/proc_assertions/

README

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.

Commit count: 34

cargo fmt