{"repo":"regexident/cargo-modules","free":true,"listed":false,"github":"https://github.com/regexident/cargo-modules","clone":"git clone https://github.com/regexident/cargo-modules.git","description":"Visualize/analyze a Rust crate's internal structure","language":"Rust","stars":1256,"topics":["rust","cargo-commands","developer-tools","tooling","rust-tools","code-analysis-tool"],"license":"MPL-2.0","category":"dev-tools","readme_excerpt":"cargo-modules Synopsis A cargo plugin for visualizing/analyzing a crate's internal structure. Motivation With time, as your Rust projects grow bigger and bigger, it gets more and more important to properly structure your code. Fortunately Rust provides us with a quite sophisticated module system, allowing us to neatly split up our crates into arbitrarily small sub-modules of types and functions. While this helps to avoid monolithic and unstructured chunks of code, it can also make it hard at times to still mentally stay on top of the over-all high-level structure of the project at hand. This is where cargo-modules comes into play: Installation Install cargo-modules via: Usage The cargo-modules tool comes with a couple of commands: Command help cargo modules structure Print a crate's hierarchical structure as a tree: Command help Example: Modules Structure as Text Tree Output: (Project source code: readme tree example/src/lib.rs) Terminal Colors If you are running the command on a terminal with color support and don't have NO COLOR defined in your environment, then the output will be colored for easier visual parsing: The (more info) is furthermore highlighted by the following colors: Color Meaning -------- ---------------------------------------------------------------------------------- 🟢 green Items visible to all and everything (i.e. pub ) 🟡 yellow Items visible to the current crate (i.e. pub(crate) ) 🟠 orange Items visible to a certain parent module (i.e. pub(in path) ","default_branch":null,"files":null,"tree":[],"storefront":"/r/regexident","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/regexident/cargo-modules/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}