petgraph/petgraph
Graph data structure library for Rust. observed · 2026-08-28
Health v2 · maintenance only
78/100
- Activity 99
- Release rhythm 38
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 60
- age_days: 4272
- days_rel: 337
- days_push: 10
- n_releases_24m: 4
Adoption not part of the score
4004 stars · 460 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
Petgraph is a Rust library providing fast, flexible graph data structures (Graph, StableGraph, GraphMap, MatrixGraph) with directed and undirected edges and arbitrary node/edge data. It includes algorithms such as Dijkstra's shortest path, minimum spanning trees, and graph isomorphism, plus Graphviz DOT import/export.
Use cases
- find shortest paths in a graph in Rust
- compute minimum spanning trees
- check graph isomorphism
- represent directed and undirected graphs with node and edge data
- export graphs to Graphviz DOT format
- implement custom graph algorithms via traits
- run union-find on graph nodes
When to choose
- you need general-purpose graph data structures and algorithms in Rust
- you want multiple graph representations with different performance tradeoffs
- you need to visualize graphs via Graphviz DOT
- you want a mature, widely used, permissively licensed Rust crate
When to avoid
- you need distributed or out-of-core graph processing on massive graphs
- you need dynamic graph visualization or interactive rendering (use a visualization tool instead)
- you need a graph database with persistence and queries
- you are not working in Rust
Facets
library · maturity stable
developer-tools data-science graphics data-science developer-tools rust cross-platform graph-data-structures graph-algorithms shortest-path minimum-spanning-tree graphviz-dot directed-graphs undirected-graphs data-structure algorithms
10 sources
- readme: https://github.com/petgraph/petgraph · fetched 2026-08-28 · e120337dd713
- homepage: https://docs.rs/petgraph/ · fetched 2026-08-29 · 13120e6c4ca1
- site_page: https://docs.rs/ · fetched 2026-08-29 · 35213d539031
- site_page: https://docs.rs/crate/petgraph/latest · fetched 2026-08-29 · e77b2653df19
- site_page: https://docs.rs/crate/petgraph/latest/features · fetched 2026-08-29 · 1e9aa969e4d0
- site_page: https://docs.rs/about · fetched 2026-08-29 · 29ab7986fbf5
- site_page: https://docs.rs/about/badges · fetched 2026-08-29 · 6588cac258af
- site_page: https://docs.rs/about/builds · fetched 2026-08-29 · 811231ca4680
- site_page: https://docs.rs/about/metadata · fetched 2026-08-29 · 0dcdccb2b2b2
- site_page: https://docs.rs/about/redirections · fetched 2026-08-29 · 1b1efd93105f
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| petgraph/petgraph | main | 78 |
For agents
markdown · JSON · MCP: product_card(name="petgraph/petgraph")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem