| Crates.io | workspacer-tree |
| lib.rs | workspacer-tree |
| version | 0.1.2 |
| created_at | 2025-04-01 21:03:08.678111+00 |
| updated_at | 2025-07-13 04:26:54.928797+00 |
| description | A Rust crate to asynchronously build and render workspace dependency trees for Rust projects. It provides tools for managing and visualizing dependencies using graph-based approaches. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1615557 |
| size | 164,985 |
A robust Rust library designed to build and render hierarchical representations of workspace dependency trees. This crate leverages asynchronous operations to efficiently construct dependency graphs, facilitating the examination and visualization of project structures.
To use workspacer-tree, implement the WorkspaceTreeBuilder trait in your own workspace struct:
use async_trait::async_trait;
use workspacer_tree::{WorkspaceTreeBuilder, WorkspaceDependencyTree, WorkspaceError};
#[async_trait]
impl WorkspaceTreeBuilder for MyWorkspace {
async fn build_workspace_tree(&self, levels: usize, verbose: bool) -> Result<WorkspaceDependencyTree, WorkspaceError> {
// Implementation...
}
}
Rendering a workspace tree:
let tree = workspace_builder.build_workspace_tree(3, true).await?;
println!("{}", tree.render(true, true));
The example above demonstrates rendering a workspace tree with depth limit set to 3, displaying both version and path details.
This crate employs graph-theoretic techniques to identify root nodes (i.e., packages with no dependencies) and construct a comprehensive tree structure. Dependency edges are efficiently managed through an adjacency list representation.
Ideal for developers managing large Rust workspaces, it assists in visualizing and managing complex dependency structures.
This README was generated by an AI model and may not be 100% accurate but it should be pretty good.