Skip to main content

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;
38pub(crate) mod compare;
39#[doc(hidden)]
40pub mod compare_driver_shared;
41#[doc(hidden)]
42pub mod compare_normalization;
43pub mod copyright;
44pub mod finder;
45pub mod golden_maintenance;
46pub mod license_detection;
47pub mod models;
48pub mod output;
49pub mod output_schema;
50pub mod parsers;
51#[cfg(feature = "golden-tests")]
52pub mod post_processing;
53#[cfg(not(feature = "golden-tests"))]
54pub(crate) mod post_processing;
55pub mod progress;
56pub(crate) mod scan_result_shaping;
57pub mod scanner;
58pub(crate) mod serve;
59#[doc(hidden)]
60pub mod serve_api;
61#[cfg(test)]
62pub(crate) mod test_support;
63pub(crate) mod time;
64pub mod utils;
65pub mod version;
66pub mod workflow;
67
68pub use cli::ProcessMode;
69pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
70pub use output::{
71    OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
72};
73pub use parsers::{NpmParser, PackageParser};
74pub use progress::{ProgressMode, ScanProgress};
75pub use scanner::{
76    CollectedPaths, ProcessResult, TextDetectionOptions, collect_paths, process_collected,
77};