{"id":13995295,"url":"https://github.com/purpleprotocol/graphlib","last_synced_at":"2025-04-04T22:07:12.587Z","repository":{"id":45537186,"uuid":"175621410","full_name":"purpleprotocol/graphlib","owner":"purpleprotocol","description":"Simple but powerful graph library for Rust","archived":false,"fork":false,"pushed_at":"2023-01-14T18:45:42.000Z","size":173,"stargazers_count":193,"open_issues_count":9,"forks_count":14,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-28T21:06:57.277Z","etag":null,"topics":["data-structures","graph","graph-algorithm","library","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purpleprotocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"liberapay":"octavonce"}},"created_at":"2019-03-14T12:52:32.000Z","updated_at":"2025-03-02T18:00:12.000Z","dependencies_parsed_at":"2023-02-09T20:10:12.210Z","dependency_job_id":null,"html_url":"https://github.com/purpleprotocol/graphlib","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purpleprotocol%2Fgraphlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purpleprotocol%2Fgraphlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purpleprotocol%2Fgraphlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purpleprotocol%2Fgraphlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purpleprotocol","download_url":"https://codeload.github.com/purpleprotocol/graphlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256112,"owners_count":20909240,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-structures","graph","graph-algorithm","library","rust"],"created_at":"2024-08-09T14:03:20.353Z","updated_at":"2025-04-04T22:07:12.568Z","avatar_url":"https://github.com/purpleprotocol.png","language":"Rust","readme":"# Graphlib \n[![Build Status]][travis] [![Discord Badge]][Discord] [![Latest Version]][crates.io] [![Documentation]][docs.rs] \n\nGraphlib is a simple and powerful Rust graph library. \n\n---\n\nThis library attempts to provide a generic api for building, mutating and iterating over graphs that is similar to that of other data-structures found in Rust i.e. `Vec`, `HashMap`, `VecDeque`, etc. \n\n### Using Graphlib\n```rust\nuse graphlib::Graph;\n\nlet mut graph: Graph\u003cusize\u003e = Graph::new();\n\n// Add two vertices to the graph\nlet id1 = graph.add_vertex(1);\nlet id2 = graph.add_vertex(2);\n\n// Add an edge between the two vertices\ngraph.add_edge(\u0026id1, \u0026id2);\n\nassert_eq!(*graph.fetch(\u0026id1).unwrap(), 1);\nassert_eq!(*graph.fetch(\u0026id2).unwrap(), 2);\n\n// The graph has 2 vertices and one edge at this point\nassert_eq!(graph.vertex_count(), 2);\nassert_eq!(graph.edge_count(), 1);\n\n// Remove one of the connected vertices\ngraph.remove(\u0026id1);\n\nassert_eq!(graph.vertex_count(), 1);\nassert_eq!(graph.edge_count(), 0);\n```\n\n### Using without `std`\nIn `Cargo.toml`:\n```toml\n[dependencies]\ngraphlib = { version = \"*\", features = [\"no_std\"] }\n```\n\n### Contributing\nWe welcome anyone wishing to contribute to Graphlib! Check out the [issues section][issues] of the repository before starting out.\n\n### License\n\nGraphlib is licensed under the MIT license.\n\n[Build Status]: https://travis-ci.org/purpleprotocol/graphlib.svg?branch=master\n[Discord Badge]: https://img.shields.io/discord/435827644915777536.svg\n[Discord]: https://discord.gg/eGBzyaA\n[travis]: https://travis-ci.org/purpleprotocol/graphlib\n[crates.io]: https://crates.io/crates/graphlib\n[Latest Version]: https://img.shields.io/crates/v/graphlib.svg\n[Documentation]: https://docs.rs/graphlib/badge.svg\n[docs.rs]: https://docs.rs/graphlib\n[issues]: https://github.com/purpleprotocol/graphlib/issues\n\n","funding_links":["https://liberapay.com/octavonce"],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurpleprotocol%2Fgraphlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurpleprotocol%2Fgraphlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurpleprotocol%2Fgraphlib/lists"}