What problem does it solve?
Audit hot-path code to detect allocation and synchronization issues that can cause performance regressions or correctness bugs.
Core Features & Use Cases
- Allocation Violations: scan hot-path files for patterns like Box::new, Vec::new(), String::new(), Arc::new, .clone(), .to_string(), .to_owned() and flag risky allocations; Exceptions: Vec::with_capacity() at end of path is acceptable.
- Lock Violations: flag usage of Mutex::new, RwLock::new, .lock(), .read(), or .write() with across .await boundaries; encourage use of non-blocking or parking_lot primitives;
- Syscall Violations: detect Instant::now(), SystemTime::now(), or std::time patterns that introduce non-deterministic timing; prefer shard-cached timestamps.
- Copy Violations: detect .to_vec(), .to_owned(), copy_from_slice and advocate zero-copy alternatives like Bytes::slice().
- Branch Density: identify match arms with excessive cases or nested branches that hinder performance.
Quick Start
Run the hot-path audit on your Rust codebase to identify allocation, lock, syscall, copy, and branch-density violations and generate a remediation report.