https://github.com/tamaroning/src-graph
cargo subcommand which shows dependencies between user defined data types
https://github.com/tamaroning/src-graph
rust-lang
Last synced: 3 months ago
JSON representation
cargo subcommand which shows dependencies between user defined data types
- Host: GitHub
- URL: https://github.com/tamaroning/src-graph
- Owner: tamaroning
- Created: 2022-06-25T13:32:12.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-06-26T10:43:15.000Z (about 3 years ago)
- Last Synced: 2025-03-25T06:51:12.068Z (4 months ago)
- Topics: rust-lang
- Language: Rust
- Homepage: https://crates.io/crates/src-graph
- Size: 83 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# src-graph
Cargo subcommand which shows user-defined data type dependencies.If you found a bug, please open an issue.

# Requirement
- Cargo
- Graphviz (for generating an image)# Install
From crates.io
```
$ cargo install src-graph
```From source code
```
$ git clone https://github.com/tamaroning/src-graph.git
$ cd src-graph
$ cagro install --path .
```# Usage
Run in your rust project
```
$ cargo src-graph
```then generate an image from the dot file
```
$ dot -Tpng -o ./.src_graph/adt_deps.png ./.src_graph/adt_deps.dot
```# Example
The code below
```rust
use std::collections::HashMap;struct S {
a: Vec,
b: HashMap,
c: mod_A::S3,
}struct S2 {
a: mod_A::S3,
}mod mod_A {
pub struct S3 {
a: Box>,
}
}
```generates this graph:
