I'm playing around with where best to host and reference code generated in a
build.rs. Cargo can be used with
rustdoc by way of
cargo doc. In the grand-scheme of what
rustdoc accomplishes, it generates a tree of how the modules relate to each other.
Is there a cargo command that outputs the module structure of the crate? I could not find anything in the docs nor
--help but suspect there might be a way. I could have missed something. Is anyone aware of this capability?
You could use the
cargo modules sub-command.
$ cargo install cargo-modules
$ cargo modules generate tree
├── mod asset_loader: pub
│ └── mod builtin: pub(self) #[cfg(feature = "builtins")]
├── mod codegen: pub
│ └── mod query: pub(self)
├── mod config: pub(crate)
├── mod im: pub
├── mod parse: pub
│ ├── mod query: pub(self)
│ └── mod yaml: pub
│ └── mod document_serde: pub(self)
└── mod type_check: pub
└── mod types: pub(self)
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.