-
Notifications
You must be signed in to change notification settings - Fork 440
Description
This issue outlines the public roadmap of the next few versions. The idea here is to have a concrete set of tasks to allow for consolidation of the next branch with the current petgraph codebase with minimal disruptions. Which is a departure of the previous approach.
At the same time, this issue serves as a central tracking issue for the entire transition. Listing tasks and linking to their respective tracking issues.
For ways of contributing to this transition, please refer to the section on "Ways to Help".
0.8.x
The 0.8 series is going to continue under a dedicated 0.8 branch, we're only going to push fixes to it. The 0.8.3. release will be the last planned release for 0.8. The versions >= 0.9 will then be based on 0.8.3..
0.9.0 ("Port")
This will mark the first version in the transition, during it we will do the following tasks:
- Create
petgraph-corecrate (feat!: create new crate layout #923) - Create the core traits (feat!: new trait layout #927)
- Document the new traits ( @indietyp is in charge )
- Port over the
dinograph backend (potentially as the default) ( @indietyp is in charge) - Remove old traits, depend on 0.8, and expose, deprecate and keep those traits implemented (semver trick)
- Implement traits on the existing set of graphs ( ready for review: feat(core): Implement new traits on 'old' Graphs #944 )
- Port algorithms over to the new core traits ( A tracking issue for this will follow soon ( in the work at https://github.com/petgraph/petgraph/tree/rl/port_flow_algs_as_example ) )
- Write tests. In particular for new Graph traits ( ready for review: test: Add
DirectedGraphTest macro #947 ) - Rewrite / implement Graph Backends (
MatrixGraphPR is ready for review: feat: Port and rewriteMatrixGraph#964 . Further graphs can also be moved to a later release )
Intended crate structure:
-
petgraph- Contains Graph Implementations, i.e.
Graph,Acyclic,CsrGraph, IO (DOThandling) - Re-Exports old Traits (semver trick)
- Implements New Traits on (new and old) Graph Implementations
- Contains Graph Implementations, i.e.
-
petgraph-core- Contains "new" Traits
- Contains "new" Node and Edge types as well as Id traits corresponding to the new traits
-
petgraph-algorithms- Contains all current existing Algorithms implemented on the new traits.
- Algorithms are subdivided into modules by problem category instead of specific algorithm name
0.10.0 ("Split")
- Continue improving the algorithm implementations
- Refactor algorithms to be trait based and more generic
- Visit traits and walkers would also become simple algorithms, instead of being special-cased
- Where possible keep the old signature and deprecate it
- Factor out (where it makes sense) implementations into subcrates
- This might mean (after some evaluation) that the graph implementations get their own crate, with the
petgraphcrate essentially becoming a simple re-export petgraph-algorithmsbecoming an external crate, only depending onpetgraph-core- additional functionality like graph read/write (
petgraph-io), generators (petgraph-generators) and quickcheck/proptest as separate crates that work over the defined traits
- This might mean (after some evaluation) that the graph implementations get their own crate, with the
- Remove old deprecated interfaces (Possibly move this to 0.11.)
Intended crate structure:
-
petgraph- See 0.9.
- IO, e.g.
DOTserialization / deserialization is moved into separate crate - Concrete Graph implementations might be moved into individual crates
-
petgraph-core- See 0.9.
-
petgraph-algorithms- See 0.9.
-
petgraph-io- Contains functionality for serializing / deserializing Graphs, ideally for most popular formats
-
petgraph-graph-...- (Indvidual) Crate for each graph implementation (not certain yet)
0.11.0 ("Finish")
- Evaluate state of
petgraph, possibly re-adjust based on the experience gathered - Extend the set of traits available
- Tackle other new features 🦕
"Final" Intended crate structure
-
petgraph- Mainly re-exports traits / types / functionality from the other crates
-
petgraph-core- Contains Graph Traits and Types/Traits for Nodes, Edges and Ids
-
petgraph-algorithms- Contains all algorithms in a discoverable way
-
petgraph-io- Contains functionality for serializing / deserializing Graphs, ideally for most popular formats
-
petgraph-generators- Contains generators for different types of graphs similar to
networkxs generators
- Contains generators for different types of graphs similar to
-
petgraph-graph-- (Individual) Crate for each graph implementation (might also be part of
petgraphmain crate)
- (Individual) Crate for each graph implementation (might also be part of
With community feedback we're likely going to be changing the timeline, but these changes should enable us to make developing new graph algorithm interfaces a lot more straightforward and increase maintainability.
Ways to Help
We're super glad about anyone who wants to help us in these tasks !
To be able to better coordinate work and make sure that people are not working on the same things, please reach out to us, here or on our Discord. We want to set up tracking issues for tasks where applicable to better subdivide the tasks and make them more digestible.
Feel free to let us know if you want to help with future tasks or tasks missing specific instructions / tracking issues 🦕
Last update: 18.02.2026
For the most recent updates, please check the petgraph Discord.