icb_graph/lib.rs
1//! # icb-graph
2//!
3//! Code Property Graph engine.
4//!
5//! This crate builds and queries the Code Property Graph (CPG). It consumes
6//! [`RawNode`] facts from `icb-parser`, deduplicates symbols using their
7//! unique identifiers, and provides query APIs for tasks like finding all
8//! functions or call sites.
9//!
10//! The graph is stored as a [`petgraph::stable_graph::StableGraph`] with
11//! node and edge types defined in the [`graph`] module.
12//!
13//! # Workflow
14//!
15//! 1. Create a [`builder::GraphBuilder`].
16//! 2. Call [`builder::GraphBuilder::ingest_file_facts`] with the facts from
17//! one or more files.
18//! 3. Access the [`graph::CodePropertyGraph`] via the builder's `cpg` field.
19//! 4. Use [`query`] functions to extract information.
20
21pub mod analysis;
22pub mod builder;
23pub mod cache;
24pub mod graph;
25pub mod query;
26pub mod visualizer;