---
title: "petgraph 0.8.0 Breaking Changes on crates.io | Since.dev"
description: "What each petgraph release removed, renamed or changed: 28 breaking changes in 2 versions on crates.io, each with its source."
canonical_url: https://since.dev/packages/crates/petgraph
last_updated: 2026-12-04
---

# petgraph breaking changes

petgraph 0.8.0 (April 5, 2025) is its newest release with breaking changes, 27 of them. The first: Removed petgraph::dot::Config::\_Incomplete. Every breaking API change we have recorded in petgraph on crates.io: 28 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `0.8.3`, released September 30, 2025. [Source repository](https://github.com/petgraph/petgraph)

Packages on crates.io run on Rust. [Rust end of life dates](https://since.dev/calendar/rust.md).

- From [0.7.0](#v-0-7-0) to [0.8.0](#v-0-8-0): 27 breaking changes in 1 version.

## petgraph 0.8.0 breaking changes

petgraph 0.8.0, released April 5, 2025: 27 breaking changes.

- **Removed** `petgraph::dot::Config::_Incomplete`  

petgraph::dot::Config::\_Incomplete was removed in petgraph 0.8.0 [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `dot.Config`  

Code that builds dot::Config with a struct literal will fail to compile. Construct it through its constructor or defaults and update fields instead. [github.com](https://github.com/petgraph/petgraph/releases/tag/petgraph%40v0.8.0)
- **Signature changed** `petgraph::algo::all_simple_paths`  

Was fn all_simple_paths\<TargetColl, G>(graph: G, from: G::NodeId, to: G::NodeId, min_intermediate_nodes: usize, max_intermediate_nodes: Option\<usize>) -> impl Iterator\<Item = TargetColl> where G: NodeCount, G: IntoNeighborsDirected... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::BoundedMeasure`  

Was trait BoundedMeasure: Measure + std::ops::Sub\<Self, Output = Self>; now trait BoundedMeasure: Measure + core::ops::Sub\<Self, Output = Self>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::floyd_warshall`  

Was fn floyd_warshall\<G, F, K>(graph: G, mut edge_cost: F) -> Result\<HashMap<(G::NodeId, G::NodeId), K>, NegativeCycle> where G: NodeCompactIndexable + IntoEdgeReferences + IntoNodeIdentifiers + GraphProp, G::NodeId: Eq + Hash, F... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::floyd_warshall::floyd_warshall`  

Was fn floyd_warshall\<G, F, K>(graph: G, mut edge_cost: F) -> Result\<HashMap<(G::NodeId, G::NodeId), K>, NegativeCycle> where G: NodeCompactIndexable + IntoEdgeReferences + IntoNodeIdentifiers + GraphProp, G::NodeId: Eq + Hash, F... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::is_bipartite_undirected`  

Was fn is_bipartite_undirected\<G, N, VM>(g: G, start: N) -> bool where G: GraphRef + Visitable\<NodeId = N, Map = VM> + IntoNeighbors\<NodeId = N>, N: Copy + PartialEq + std::fmt::Debug, VM: VisitMap\<N>,; now fn is_bipartite_undirected\<G, N... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::page_rank::parallel_page_rank`  

Was fn parallel_page_rank\<G, D>(graph: G, damping_factor: D, nb_iter: usize, tol: Option\<D>) -> Vec\<D> where G: NodeCount + IntoEdges + NodeIndexable + std::marker::Sync, D: UnitMeasure + Copy + std::marker::Send + std::marker::Sync,; now... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::simple_paths::all_simple_paths`  

Was fn all_simple_paths\<TargetColl, G>(graph: G, from: G::NodeId, to: G::NodeId, min_intermediate_nodes: usize, max_intermediate_nodes: Option\<usize>) -> impl Iterator\<Item = TargetColl> where G: NodeCount, G: IntoNeighborsDirected... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::algo::UnitMeasure`  

Was trait UnitMeasure: Measure + std::ops::Sub\<Self, Output = Self> + std::ops::Mul\<Self, Output = Self> + std::ops::Div\<Self, Output = Self> + std::iter::Sum; now trait UnitMeasure: Measure + core::ops::Sub\<Self, Output = Self> +... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::graphmap::DiGraphMap`  

Was type DiGraphMap\<N, E> = GraphMap\<N, E, Directed>; now type DiGraphMap\<N, E, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> = GraphMap\<N, E, Directed, S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::graphmap::Edges`  

Was struct Edges<'a, N, E: 'a, Ty, S = RandomState> where N: 'a + NodeTrait, Ty: EdgeType, S: BuildHasher,; now struct Edges<'a, N, E: 'a, Ty, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> where N: 'a +... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::graphmap::EdgesDirected`  

Was struct EdgesDirected<'a, N, E: 'a, Ty, S = RandomState> where N: 'a + NodeTrait, Ty: EdgeType, S: BuildHasher,; now struct EdgesDirected<'a, N, E: 'a, Ty, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> where... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::graphmap::GraphMap`  

Was struct GraphMap\<N, E, Ty, S = RandomState> where S: BuildHasher,; now struct GraphMap\<N, E, Ty, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> where S: BuildHasher,. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::graphmap::UnGraphMap`  

Was type UnGraphMap\<N, E> = GraphMap\<N, E, Undirected>; now type UnGraphMap\<N, E, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> = GraphMap\<N, E, Undirected, S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::DiMatrix`  

Was type DiMatrix\<N, E, Null = Option\<E>, Ix = DefaultIx> = MatrixGraph\<N, E, Directed, Null, Ix>; now type DiMatrix\<N, E, #\[cfg(feature = "std")\] S = RandomState, #\[cfg(not(feature = "std"))\] S, Null = Option\<E>, Ix = DefaultIx> =... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::MatrixGraph`  

Was struct MatrixGraph\<N, E, Ty = Directed, Null: Nullable\<Wrapped = E> = Option\<E>, Ix = DefaultIx>; now struct MatrixGraph\<N, E, #\[cfg(feature = "std")\] S = RandomState, #\[cfg(not(feature = "std"))\] S, Ty = Directed, Null... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::MatrixGraph::from_edges`  

Was fn from_edges\<I>(iterable: I) -> Self where I: IntoIterator, I::Item: IntoWeightedEdge\<E>, \<I::Item as IntoWeightedEdge\<E>>::NodeId: Into\<NodeIndex\<Ix>>, N: Default,; now fn from_edges\<I>(iterable: I) -> Self where I: IntoIterator... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::MatrixGraph::new`  

Was fn new() -> Self; now fn new() -> Self. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::MatrixGraph::new_undirected`  

Was fn new_undirected() -> Self; now fn new_undirected() -> Self. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::MatrixGraph::with_capacity`  

Was fn with_capacity(node_capacity: usize) -> Self; now fn with_capacity(node_capacity: usize) -> Self where S: Default,. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::NodeIdentifiers`  

Was struct NodeIdentifiers<'a, Ix>; now struct NodeIdentifiers<'a, Ix, #\[cfg(feature = "std")\] S = RandomState, #\[cfg(not(feature = "std"))\] S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::NodeReferences`  

Was struct NodeReferences<'a, N: 'a, Ix>; now struct NodeReferences<'a, N: 'a, Ix, #\[cfg(feature = "std")\] S = RandomState, #\[cfg(not(feature = "std"))\] S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::matrix_graph::UnMatrix`  

Was type UnMatrix\<N, E, Null = Option\<E>, Ix = DefaultIx> = MatrixGraph\<N, E, Undirected, Null, Ix>; now type UnMatrix\<N, E, #\[cfg(feature = "std")\] S = RandomState, #\[cfg(not(feature = "std"))\] S, Null = Option\<E>, Ix = DefaultIx> =... [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::prelude::DiGraphMap`  

Was type DiGraphMap\<N, E> = GraphMap\<N, E, Directed>; now type DiGraphMap\<N, E, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> = GraphMap\<N, E, Directed, S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::prelude::GraphMap`  

Was struct GraphMap\<N, E, Ty, S = RandomState> where S: BuildHasher,; now struct GraphMap\<N, E, Ty, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> where S: BuildHasher,. [crates.io](https://crates.io/crates/petgraph/0.8.0)
- **Signature changed** `petgraph::prelude::UnGraphMap`  

Was type UnGraphMap\<N, E> = GraphMap\<N, E, Undirected>; now type UnGraphMap\<N, E, #\[cfg(not(feature = "std"))\] S, #\[cfg(feature = "std")\] S = RandomState> = GraphMap\<N, E, Undirected, S>. [crates.io](https://crates.io/crates/petgraph/0.8.0)

## petgraph 0.7.0 breaking changes

petgraph 0.7.0, released December 31, 2024: 1 breaking change.

- **Signature changed** `petgraph::algo::Cycle`  

Was struct Cycle\<N>(N); now struct Cycle\<N>(pub(crate) N). [crates.io](https://crates.io/crates/petgraph/0.7.0)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
