Description
Static analysis tool for Rust embedded systems complexity.
Description
ReduxWise analyzes Rust projects for real-time embedded system scheduling. It detects IO operations, yield points, and computational complexity to help classify functions for embedded schedulers.
Features:
Analyzes IO operations (I2C, SPI, Flash, UART, Network, ADC, GPIO)
Detects yield points (.await, yield_now)
Measures computational complexity (loops, branches, arithmetic)
Classifies functions as IO-bound or CPU-bound
Generates JSON reports for scheduler integration
Parallel processing for fast analysis
See README for usage examples and documentation.
README.md
Reduxwise: Static analysis tool for real-time embedded system scheduling in Rust. Analyzes IO operations, computations, and complexity for real-time scheduling.
Build
stack build
Install
stack install
Binary installed to ~/.local/bin/reduxwise-exe
Usage
# Analyze a Rust project
reduxwise-exe /path/to/rust/project -o analysis.json
# With verbose output
reduxwise-exe /path/to/rust/project -v -o report.json
# Exclude directories
reduxwise-exe ./project --exclude "vendor,build" -o analysis.json
Options
reduxwise-exe PROJECT_PATH [OPTIONS]
Options:
-o, --output FILE Output JSON file (default: analysis.json)
-e, --exclude DIRS Comma-separated directories to exclude
-v, --verbose Verbose output
-h, --help Show help
Output
JSON report with:
- Function complexity scores
- IO operations (I2C, SPI, Flash, UART, Network, ADC, GPIO)
- Yield points (
.await,yield_now()) - Computations (loops, branches, arithmetic)
- Function classification (IO-bound vs CPU-bound)
Example
reduxwise-exe ~/my-embedded-project -v -o analysis.json
cat analysis.json | jq '.summary'
Output:
{
"total_functions": 390,
"io_bound_functions": 4,
"cpu_bound_functions": 362
}
Requirements
- Stack (Haskell build tool)
- Rust project with
Cargo.toml
License
See LICENSE file.