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
On this page
Latest version 0.8.3, released September 30, 2025. Source repository
Packages on crates.io run on Rust. Rust end of life dates.
petgraph 0.8.0 breaking changes
- Removed
petgraph::dot::Config::_Incomplete
petgraph::dot::Config::_Incomplete was removed in petgraph 0.8.0 crates.io - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - 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 - Signature changed
petgraph::matrix_graph::MatrixGraph::new
Was fn new() -> Self; now fn new() -> Self. crates.io - Signature changed
petgraph::matrix_graph::MatrixGraph::new_undirected
Was fn new_undirected() -> Self; now fn new_undirected() -> Self. crates.io - 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 - 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 - 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 - 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 - 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 - 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 - 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
petgraph 0.7.0 breaking changes
- Signature changed
petgraph::algo::Cycle
Was struct Cycle<N>(N); now struct Cycle<N>(pub(crate) N). crates.io
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.