Skip to main content

sbom_tools/model/
mod.rs

1//! Intermediate representation for normalized SBOMs.
2//!
3//! This module defines the canonical data structures used for format-agnostic
4//! SBOM comparison. Both `CycloneDX` and SPDX formats are normalized to these
5//! structures before diff operations.
6//!
7//! # Index Support
8//!
9//! For efficient TUI operations on large SBOMs, use [`NormalizedSbomIndex`]
10//! to precompute lookups:
11//!
12//! ```ignore
13//! let sbom = parse_sbom(&path)?;
14//! let index = NormalizedSbomIndex::build(&sbom);
15//!
16//! // O(1) dependency lookup instead of O(edges)
17//! let deps = index.dependencies_of(&component_id, &sbom.edges);
18//! ```
19
20mod cra_sidecar;
21mod identifiers;
22mod index;
23mod license;
24mod metadata;
25mod sbom;
26mod vulnerability;
27
28pub use cra_sidecar::*;
29pub use identifiers::*;
30pub use index::*;
31pub use license::*;
32pub use metadata::*;
33pub use sbom::*;
34pub use vulnerability::*;