MyNixOS website logo
Description

Static analysis tool for Rust embedded systems complexity.

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.

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.

Metadata

Version

0.1.0.0

Platforms (76)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows