Crates / petgraph / Alternatives
Rust crate alternatives · data Oct 24, 2026
Alternatives to petgraph
Short answerThe closest alternatives to petgraph on crates.io data are either (3M real downloads a day), arrayvec (1.7M real downloads a day), ndarray (355K real downloads a day). Of the 8 we list, the most used is itertools, and 6 shipped a release in the last year. petgraph itself gets 1,525,364 a day with 1,570 dependents.
Every alternative we found
| Alternative | Real downloads a day | vs petgraph | Dependents | Last release | Why it is listed | |
|---|---|---|---|---|---|---|
| either Widely used | 3,049,603 | 2.00x | 1,488 | 18d | category Data structures, keyword "data-structure" | side by side |
| arrayvec Widely used | 1,733,744 | 1.14x | 1,215 | 4mo | category Data structures, keyword "data-structure" | compare |
| ndarray Widely used | 354,525 | 0.23x | 2,985 | 9mo | category Data structures, keyword "data-structure" | compare |
| triomphe Established | 238,807 | 0.16x | 172 | 14d | category Data structures, keyword "data-structure" | compare |
| nibble_vec Pulled in | 234,547 | 0.15x | 3 | 6.3y | category Data structures, keyword "data-structure" | compare |
| itertools Widely used | 4,545,996 | 2.98x | 8,656 | 4mo | keyword "data-structure" | compare |
| maplit Established | 266,928 | 0.17x | 819 | 7.2y | keyword "data-structure" | compare |
| smallvec Widely used | 3,868,589 | 2.54x | 4,345 | 1d | category Data structures | compare |
How to choose
- Same job, not the same API. Each line is listed because it shares a crates.io category or keyword with petgraph; read its description before you swap.
- More dependents means more answered questions and a smaller chance it disappears.
- Check the last release against how fast you need fixes. For petgraph: is it still maintained?
Rules
Alternatives = tracked crates (top 1000 by downloads) that share a specific crates.io category (2 points each) or keyword (3 points each) with petgraph, most similar first; its own parts (same name prefix) and crates it depends on or that depend on it are left out, because those are companions, not substitutes. Real downloads = quiet-day median, crates.io data Oct 24, 2026. Built when we find 3 or more.
Up next
The closest alternative: Widely used and steady. 3,049,603 real downloads a day.eitherRust crate. The enum `Either` with variants `Left` and `Right` is a general purpose sum type with two cases. Real use: 3M downloads a day on quiet days; 1,488 crates...Read it next →Also worth your time