#async #analysis #metrics #workspace

workspacer-analysis

Asynchronous Rust crate for detailed analysis of workspace file metrics, including sizes, lines of code, and file counts across crates

2 releases

Uses new Rust 2024

0.1.2 Jul 13, 2025
0.1.1 Apr 1, 2025

#431 in #workspace

Download history 94/week @ 2025-12-28 95/week @ 2026-01-04 38/week @ 2026-01-11 103/week @ 2026-01-18 103/week @ 2026-01-25 134/week @ 2026-02-01 52/week @ 2026-02-08 65/week @ 2026-02-15 122/week @ 2026-02-22 69/week @ 2026-03-01 67/week @ 2026-03-08 102/week @ 2026-03-15 107/week @ 2026-03-22 89/week @ 2026-03-29 86/week @ 2026-04-05 85/week @ 2026-04-12

367 downloads per month
Used in 40 crates (via workspacer-export)

MIT license

320KB
3K SLoC

workspacer-analysis

workspacer-analysis is a Rust library designed for exhaustive statistical analysis of Rust workspaces. It efficiently processes large codebases, providing detailed insights into source and test files across multiple crates using asynchronous computations.

Features

  • Asynchronous Analysis: Leveraging Rust's async capabilities, the library conducts analyses without blocking, enhancing performance in typical development environments.
  • Comprehensive Metrics: Provides metrics such as total file size, lines of code, count of source and test files, and more.
  • Scalable: Can handle multiple crates efficiently, making it suitable for large projects.

Use Cases

Ideal for developers and teams needing to analyze codebase metrics simultaneously across distinct crates in a Rust workspace. It aids in pinpointing inefficiencies and optimizing code organization.

Example Usage

use workspacer_analysis::{Analyze, CrateAnalysis, Workspace};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let workspace = Workspace::new("path/to/workspace")?;
    let analysis = workspace.analyze().await?;
    println!("Total file size: {} bytes", analysis.total_file_size());
    Ok(())
}

Requirements

  • Rust 2024 edition for leveraging the latest language features.
  • Tokio for asynchronous execution.

Contributions

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License.

Dependencies

~43–83MB
~1.5M SLoC