decy-verify 1.0.1

Safety property verification for transpiled Rust code
Documentation

Safety property verification for transpiled Rust code.

Verifies memory safety, type safety, and other Rust safety guarantees.

Unsafe Code Auditing

This module provides comprehensive auditing of unsafe blocks in generated Rust code:

  • Detection and counting of all unsafe blocks
  • Confidence scoring for elimination potential
  • Suggestions for safer alternatives
  • Unsafe density metrics (<5 per 1000 LOC target)

Example

use decy_verify::{UnsafeAuditor, audit_rust_code};

let rust_code = r#"
    fn example() {
        unsafe {
            let ptr = std::ptr::null_mut();
        }
    }
"#;

let report = audit_rust_code(rust_code).expect("Failed to audit");
println!("Unsafe blocks found: {}", report.unsafe_blocks.len());
println!("Unsafe density: {:.2}%", report.unsafe_density_percent);