cargo-memlense 0.2.0-beta.1

Static analysis tool for memkit - detect memory issues before runtime
cargo-memlense-0.2.0-beta.1 is not a library.

◈ CARGO MEMLENSE ◈

[ STATIC ANALYSIS & SEMANTIC LINTING SUITE ]

Crates.io License


 ██████╗ █████╗ ██████╗  ██████╗  ██████╗ 
██╔════╝██╔══██╗██╔══██╗██╔════╝ ██╔═══██╗
██║     ███████║██████╔╝██║  ███╗██║   ██║
██║     ██╔══██║██╔══██╗██║   ██║██║   ██║
╚██████╗██║  ██║██║  ██║╚██████╔╝╚██████╔╝
 ╚═════╝╚═╝  ╚═╝╚═╝  ╚═╝ ╚═════╝  ╚═════╝ 

"Detecting what the compiler accepts, but the system forbids."

The official static analysis tool for the Memkit ecosystem. Ensures your memory patterns adhere to deterministic constraints and task-local safety rules.

◈ INSTALLATION◈ CATEGORIES◈ ARCHITECTURE


◈ THE MEMLENSE ADVANTAGE

Feature cargo check cargo memlense Results
Arena Safety Ignored Scope Validation No escapes
Async Leaks Runtime Compile-time Fast feedback
Perf Hints Basic Cache-Locality Latency wins
Patterns General Specialized Intent-driven

◈ FEATURES

┌─────────────────────────────────────────────────────────────────────────┐
│  ◆ SCOPE GUARD │  Detects when frame allocations leak across boundaries  │
│                │  of `begin_frame` and `end_frame`.                      │
├─────────────────────────────────────────────────────────────────────────┤
│  ◆ ASYNC AUDIT │  Identifies allocations held across `.await` points,    │
│                │  preventing dangerous task-migration leaks.             │
├─────────────────────────────────────────────────────────────────────────┤
│  ◆ EXPLAIN     │  Rich diagnostic explainers for every rule. Simply run  │
│                │  `cargo memlense explain <CODE>`.                        │
└─────────────────────────────────────────────────────────────────────────┘

◈ INSTALLATION

# Install the linter binary

cargo install cargo-memlense


◈ QUICK START

# Analyze your entire workspace

cargo memlense check


# Check a specific module for async violations

cargo memlense check src/network.rs --rules ML6


# Detailed explanation of a diagnostic

cargo memlense explain ML602


◈ DIAGNOSTIC CATEGORIES

Code Category Purpose
ML1xx Frame Lifecycle Lifetime mismatches
ML2xx Threading Cross-thread ownership hazards
ML3xx GPU Sync Device/Staging coordination errors
ML4xx Performance Cache locality & alignment tips
ML6xx Async Safety Task-local boundary checks

◈ ARCHITECTURE

graph TD
    Source([Source Code]) --> Parser[memlense Parser]
    Parser --> Engine{Semantic Rules}
    Engine -->|Console| UI[Rich Diagnostic TUI]
    Engine -->|JSON| CI[CI/CD Artifacts]

◈ LICENSE

Licensed under the Mozilla Public License 2.0.


[ Part of the ◈ MEMKIT ◈ Ecosystem ]