oxidescan-1.0.0 is not a library.
🛡️ cargo oxidescan
A fast, educational Rust linter that helps you ship confident, production-ready code.
cargo oxidescan scans your Rust codebase for high-risk patterns, performance pitfalls, and maintainability anti-patterns—with clear explanations, real-world context, and actionable fixes.
Inspired by real incidents like the Cloudflare Nov 2025 outage (caused by a .unwrap() on an oversized config file), cargo oxidescan doesn’t just report issues—it teaches you why they matter.
🚀 Features
- 🔍 Safety Checks: Detects
.unwrap(),.expect(),todo!(),unsafe, and more - ⚡ Performance Tips: Flags unnecessary
.clone(),println!in libs, andStringover&str - 🧹 Maintainability: Warns on deeply nested code (>4 levels)
- 📊 Health Score: Get a 0–100 score for your crate’s robustness
- 📚 Educational Output: Explains why an issue matters + how to fix it
- 💬
--explainmode: Deep-dive into any rule (likerustc --explain) - 🌐 Blazing Fast: Scans large crates in seconds with progress bar
- 🧪 Zero false positives: Focused on high-confidence, high-impact issues
📦 Installation
Or build from source:
🧰 Usage
Scan your project
Explain a rule
Example
🔍 Detected Issues
| Category | Pattern | Why It Matters |
|---|---|---|
| Safety | .unwrap(), .expect() |
Can panic → outages (e.g., Cloudflare 2025) |
todo!(), unimplemented!() |
Accidental debug code shipped to production | |
unsafe blocks |
Bypasses Rust’s memory safety guarantees | |
| Performance | .clone() |
Causes unnecessary heap allocations |
println! inside libraries |
Unconfigurable I/O → log spam | |
String where &str is enough |
Avoidable heap allocation | |
| Maintainability | Deep nesting (> 4 levels) | Hard to read, test, and maintain |
🎯 Philosophy
“Build features instead of debugging panics.”