5 releases
Uses new Rust 2024
new 0.1.4 | Apr 13, 2025 |
---|---|
0.1.3 | Apr 13, 2025 |
0.1.2 | Apr 13, 2025 |
0.1.1 | Apr 13, 2025 |
0.1.0 | Apr 12, 2025 |
#162 in Memory management
27 downloads per month
Used in 4 crates
220KB
3.5K
SLoC
Graph-API-Lib
Welcome to graph-api-lib — a delightful and powerful general-purpose library for working with graph data structures in Rust!
graph-api-lib provides a standardized API for graph mutation and traversal, abstracting away the complexity of working with different graph implementations. It allows you to write clean, maintainable graph-related code that isn't tied to a specific backend.
With graph-api-lib, graph operations become intuitive and enjoyable. Add vertices, create edges, traverse your data, and analyze graph structures with a consistent, ergonomic interface.
Dive into the graph-api book for a comprehensive guide to using this library.
Key Features
- Type-Safe Graph Operations: Leverage Rust's type system for safer, more maintainable code.
- Flexible Traversal System: Navigate your graph data with intuitive, chainable operations.
- Implementation Agnostic: Write code once that works across different graph backends.
- Ergonomic API Design: Enjoy a clean, intuitive interface that makes graph code readable and maintainable.
- Rich Query Capabilities: Find exactly what you're looking for with expressive queries.
Example Usage
// Find all people who created projects written in Rust:
let rust_creators = graph
.walk()
.vertices(Vertex::person())
.edges(Edge::created().direction(Direction::Outgoing))
.tail()
.edges(Edge::language().direction(Direction::Outgoing))
.tail()
.filter_rust()
.head()
.collect::<Vec<_ > > ();
Future Development
- Algorithm Support: Shortest path, spanning trees, and more graph algorithms.
- Cycle Detection: Prevent traversals from visiting the same element twice.
- API Refinements: Continued improvements to make graph operations even more intuitive.
Perfect For
- Social network analysis
- Dependency tracking
- Knowledge graphs
- Recommendation systems
- Any application dealing with connected data!
Dependencies
~5–17MB
~177K SLoC