{"id":57266,"library":"petgraph","title":"petgraph","description":"Graph data structure library. Provides graph types and graph algorithms.","status":"active","version":"0.8.3","language":"rust","source_language":null,"source_url":"https://github.com/petgraph/petgraph","tags":["graph","data-structure","algorithm"],"install":[{"cmd":"# Cargo.toml\n[dependencies]\npetgraph = \"0.8.3\"","lang":"toml","label":"Cargo.toml"},{"cmd":"cargo add petgraph","lang":"bash","label":"cargo add"}],"dependencies":[],"imports":[{"symbol":"Graph","correct":"use petgraph::Graph;"}],"quickstart":{"code":"use petgraph::Graph;\n\nfn main() {\n    let mut graph = Graph::<&str, i32>::new();\n    let a = graph.add_node(\"A\");\n    let b = graph.add_node(\"B\");\n    graph.add_edge(a, b, 1);\n    println!(\"Graph: {:?}\", graph);\n}","lang":"rust","description":"Create a directed graph with labeled nodes and edges."},"warnings":[],"env_vars":null,"search_vec":"'algorithm':11,16 'data':3,14 'data-structur':13 'graph':2,7,10,12 'librari':5 'petgraph':1 'provid':6 'structur':4,15 'type':8","created_at":"2026-06-16T15:35:22.850598+00:00","updated_at":"2026-06-16T15:35:22.850598+00:00","problems":[],"ecosystem":"crates","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/petgraph/petgraph","github":"https://github.com/petgraph/petgraph","docs":"https://docs.rs/petgraph/","changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["utility"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-16","next_check":"2026-12-13","install_tag":null}}