| Crates.io | workspacer-detect-circular-deps |
| lib.rs | workspacer-detect-circular-deps |
| version | 0.1.2 |
| created_at | 2025-04-01 13:49:29.280213+00 |
| updated_at | 2025-07-13 01:08:15.412057+00 |
| description | A Rust crate to construct and analyze dependency trees within a workspace, identifying circular dependencies using cargo metadata. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1614891 |
| size | 170,077 |
workspacer-detect-circular-deps is a Rust crate designed to generate and analyze dependency trees within a Rust workspace, identifying any circular dependencies. It leverages the cargo_metadata library to obtain detailed project metadata and constructs a directed graph representing each package and its dependencies.
The crate is structured around two primary asynchronous traits:
The dependency structure is modeled using WorkspaceDependencyGraph, a directed graph (DiGraph<String, ()>) where nodes represent packages and directed edges represent dependencies.
Users can implement these traits to automate the detection of circular dependencies, facilitating more robust workspace configuration and improved dependency management in Rust projects. By visualizing dependencies, developers can better understand and optimize their project's architecture.
This crate is especially useful in scenarios involving complex dependency networks within Rust workspaces, aiding in the prevention of potential build and runtime errors due to cyclic dependencies.