code-split-plugin-api 1.0.0-alpha.4

Code Split plugin contract: the generic entity/relation model + the LanguagePlugin trait. Zero dependency on other code-split crates.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! [`Graph`] — what a plugin's `analyze` returns: pure **structure**, nodes +
//! edges, and nothing computed.
//!
//! Derived data is produced centrally afterwards and lives outside this type:
//! - per-node metrics and cycle membership are written into nodes' `attrs` by id
//!   during enrichment (in the metrics/graph layer, not in this contract);
//! - graph-level cycles and averages are computed by the orchestrator and stored
//!   in the snapshot, not here.

use crate::edge::Edge;
use crate::node::Node;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, Default, Serialize, Deserialize)]
pub struct Graph {
    pub nodes: Vec<Node>,
    pub edges: Vec<Edge>,
}