Dependency graph has support for Java, JS, Ruby, Python, and .NET. But adding support for Rust doesn't seem like it would be too hard. Cargo.toml files are divided into sections and have 1 section titled dependencies that is followed by a list of names of all Rust "crates" that are dependencies. The name of a Rust "crate" can also be found in the Cargo.toml file under the section titled pacakge. Here's an example.
[package] name = "my_crate" [dependencies] this_other_crate = 0.0.6 some_other_crate = 2.0.3 still_another_crate = 0.3.0
Hi @calebwin ,
Thanks for this feedback! We're always working to improve GitHub and the GitHub Community Forum, and we consider every suggestion we receive. I've logged your feature request in our internal feature request list. Though I can't guarantee anything or share a timeline for this, I can tell you that it's been shared with the appropriate teams for consideration.
I would love to see this happening too. I've been working extensively on a rust project and support for cargo dependency graph would really complete the experience. No rush but any news?
Kudos for not saying "i forwarded it" and marking it as resolved...
Yes, i'm being spiteful, sorry. Just a bit frustrated with the state of some other feature requests.
If this is added, I think it should be noted that Cargo.lock could be preferred to Cargo.toml when present. Cargo.lock contains structured data on the entire dependency graph, including versions used, while Cargo.toml only contains version constraints.
If your environment can run commands, I also highly recommend Cargo's metadata command.
cargo metadata --format-version=1
It parses Cargo.toml and Cargo.lock files, does dependency resolution if Cargo.lock is not present, and outputs json.
The output is stable, and it's documented at https://doc.rust-lang.org/cargo/commands/cargo-metadata.html.
I just want to point out that there can be more than one `dependencies` section. This is common when specifying different dependencies for different features, architectures, etc.
See this for an example. The rest of the page is good information for how dependencies can be specified.
In addition, there can be dev-dependencies and build-dependencies.