provenant/lib.rs
1// SPDX-FileCopyrightText: Provenant contributors
2// SPDX-License-Identifier: Apache-2.0
3
4//! # Provenant
5//!
6//! `provenant` is the library crate behind the `provenant` CLI. It
7//! provides ScanCode-compatible scanning, package parsing, and output-writing
8//! building blocks for Rust applications.
9//!
10//! The main entry points are:
11//!
12//! - [`workflow::scan_path`] and [`workflow::scan_paths`] for the supported high-level embedding flow
13//! - [`collect_paths`] to discover files in a directory tree when you need lower-level control
14//! - [`process_collected`] to scan collected files in parallel when you are assembling the pipeline manually
15//! - [`OutputFormat`], [`OutputWriter`], and [`write_output_file`] to serialize scan results
16//! - [`parsers`] and [`models`] for lower-level package parsing and result inspection
17//!
18//! High-level crate organization:
19//!
20//! - [`scanner`] orchestrates traversal, filtering, and scan execution
21//! - [`license_detection`] extracts license information from files
22//! - [`parsers`] extracts package metadata from ecosystem-specific inputs
23//! - [`copyright`] and [`finder`] extract text clues such as copyrights, emails, and URLs
24//! - [`output`] renders ScanCode-compatible and SBOM-oriented output formats
25//! - [`models`] defines the core scan result data structures
26//!
27//! User-facing installation, CLI usage, supported format coverage, and broader
28//! architecture notes live in the repository documentation. The crate-level
29//! rustdoc stays intentionally concise so fast-changing project details have a
30//! single source of truth outside this file.
31
32extern crate self as provenance;
33
34pub(crate) mod app;
35pub mod assembly;
36pub mod cache;
37pub mod cli;
38#[doc(hidden)]
39pub mod compare;
40#[doc(hidden)]
41pub mod compare_driver_shared;
42#[doc(hidden)]
43pub mod compare_normalization;
44pub mod copyright;
45pub mod finder;
46pub mod golden_maintenance;
47pub mod license_detection;
48pub mod models;
49pub mod output;
50pub mod output_schema;
51pub mod parsers;
52#[cfg(feature = "golden-tests")]
53pub mod post_processing;
54#[cfg(not(feature = "golden-tests"))]
55pub(crate) mod post_processing;
56pub mod progress;
57pub(crate) mod scan_result_shaping;
58pub mod scanner;
59pub(crate) mod serve;
60#[doc(hidden)]
61pub mod serve_api;
62#[cfg(test)]
63pub(crate) mod test_support;
64pub(crate) mod time;
65pub mod utils;
66pub mod version;
67pub mod workflow;
68
69pub use cli::ProcessMode;
70pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
71pub use output::{
72 OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
73};
74pub use parsers::{NpmParser, PackageParser};
75pub use progress::{ProgressMode, ScanProgress};
76pub use scanner::{
77 CollectedPaths, ProcessResult, TextDetectionOptions, collect_paths, process_collected,
78};