Skip to content

Gives insights about cargo workspace, like how packages depend on each other

License

Notifications You must be signed in to change notification settings

jaads/cargo-workspace-analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cargo workspace analyzer

A CLI tool which provides insights about a Cargo workspace. Currently, the following is supported:

  • count the number of packages within a workspace
  • create a Mermaid diagram to show how packages depend on each other

Installation

Install it globally:

cargo install cargo-workspace-analyzer

Then navigate to a Cargo workspace and run the tool:

cd path/to/your/workspace
cargo-workspace-analyzer

or use an argument to specify the location of the workspace.

cd path/to/your/workspace
cargo-workspace-analyzer --working-dir /path/to/your/workspace

For further details, use cargo-workspace-analyzer --help

Dependency analysis

After running the analyzer, an Mermaid diagram is printed.

graph TD
    service-1 --> db-connector
    API --> service-2
    API --> service-1
    service-2 --> db-connector

You can copy it and paste it in the Mermaid Live editor. It will give you the diagram.

graph TD
    service-1 --> db-connector
    API --> service-2
    API --> service-1
    service-2 --> db-connector
Loading

Package Count

It will also display the amount of packages in your workspace.

Roadmap

Regarding features this is still in early stage. A lot can and will be analyzed in the future. The following is currently planed:

  • show how packages are related to each other
  • notice dependencies which are used in multiple packages, but not declared as workspace dependency
  • notice circular dependencies
  • ability to specify layers for the diagram

About

Gives insights about cargo workspace, like how packages depend on each other

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages