{"id":17917477,"url":"https://github.com/jaads/cargo-workspace-analyzer","last_synced_at":"2025-09-20T07:23:28.422Z","repository":{"id":259689743,"uuid":"879196126","full_name":"jaads/cargo-workspace-analyzer","owner":"jaads","description":"Visualizes and analyses package dependencies of a Cargo workspace.","archived":false,"fork":false,"pushed_at":"2025-03-13T12:22:58.000Z","size":2082,"stargazers_count":21,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-19T05:26:49.996Z","etag":null,"topics":["architecture","cargo","coupling","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaads.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-27T09:08:00.000Z","updated_at":"2025-05-09T14:14:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"949ce82d-a418-4ae3-ba6f-4e8cdd9de70e","html_url":"https://github.com/jaads/cargo-workspace-analyzer","commit_stats":null,"previous_names":["jaads/cargo-workspace-analyzer"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jaads/cargo-workspace-analyzer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaads%2Fcargo-workspace-analyzer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaads%2Fcargo-workspace-analyzer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaads%2Fcargo-workspace-analyzer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaads%2Fcargo-workspace-analyzer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaads","download_url":"https://codeload.github.com/jaads/cargo-workspace-analyzer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaads%2Fcargo-workspace-analyzer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276062840,"owners_count":25578890,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-20T02:00:10.207Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["architecture","cargo","coupling","rust"],"created_at":"2024-10-28T20:07:23.147Z","updated_at":"2025-09-20T07:23:28.380Z","avatar_url":"https://github.com/jaads.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cargo Workspace Analyzer\n\nA CLI tool which provides insights about how packages\nwithin a [Cargo workspace](https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html) are related to each other.\nCurrently, the following is supported.\n\nSee `cargo-workspace-analyzer --help` for all options.\n\n## Workspace Visualization\n\nIt visualizes the workspace with a [Mermaid](https://mermaid.js.org/) diagram. That way the user can see how packages\ndepend on each other may identify layers of the application. As an example, here is the resulting diagram a randomly\nselected workspace, [Tauri](https://github.com/tauri-apps/tauri).\n\n\u003cimg src=\"examples/tauri.svg\" alt=\"example diagram of packages within a workspace\"\u003e\n\nTo have such diagram gives you the following advantages:\n\n- a high level overview of the software\n- an idea about the degree of coupling between your packages\n\nBy default, the tool creates an SVG file called `cargo-workspace-analyzer.svg`. You can change the output format to a\n`.mmd` file with the option `-o mdd`.\n\n## Circular Dependency Detection\n\nThis analyzer finds circular dependencies. It highlights those packages, which form a circle. By running the analyzer\nregularly, one can detect circular dependencies before they get hard if not impossible to resolve later on. See\nthis [example](https://www.mermaidchart.com/raw/35c87214-1aea-46a9-b633-8fd3bd4f90ad?theme=light\u0026version=v0.1\u0026format=svg).\n\n## Metric calculations\n\nThe created graph is used to calculate common metrics in regard to the coupling of packages.\nThe following metric are supported:\n\n- Fan In\n- Fan Out\n- Instability Metric\n\n## Package and Dependency Count\n\nIt will also display the amount of packages and the amount of dependencies.\nOnce for all the founds packages and dependencies in the codebase, and once only for the packages actually within the\nworkspace and interdependencies.\n\n# Installation\n\nInstall it globally:\n\n ```sh\n cargo install cargo-workspace-analyzer\n ```\n\nTo render the Mermaid diagram and store it so disk (which is the default behaviour), you would need to have\nthe [Mermaid CLI](https://github.com/mermaid-js/mermaid-cli) installed as well, which run on Node.js.\n\n```sh\nnpm install -g @mermaid-js/mermaid-cli\n ```\n\n# Usage\n\nFor all details, use `cargo-workspace-analyzer --help`. However here is how you can use it generally:\nNavigate to a Cargo workspace and run the tool:\n\n ```sh\n cd path/to/your/workspace\n cargo-workspace-analyzer\n ```\n\nOr use an argument to specify the location of the workspace and run it from where ever you want.\n\n ```sh\n cargo-workspace-analyzer --working-dir /path/to/your/workspace\n ```\n\nBy default, it will create an SVG files in the directory where it run.\nYou can also create a mmd file, in which then only the diagram is placed in [Mermaid](https://mermaid.js.org/) syntax.\nYou can use it then for further processing. Here's an example of the content:\n\n```\ngraph TD\n    service-1 --\u003e db-connector\n    API --\u003e service-2\n    API --\u003e service-1\n    service-2 --\u003e db-connector\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaads%2Fcargo-workspace-analyzer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaads%2Fcargo-workspace-analyzer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaads%2Fcargo-workspace-analyzer/lists"}