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//! - [`collect_paths`] to discover files in a directory tree
13//! - [`process_collected`] to scan collected files in parallel
14//! - [`OutputFormat`], [`OutputWriter`], and [`write_output_file`] to serialize scan results
15//! - [`parsers`] and [`models`] for lower-level package parsing and result inspection
16//!
17//! High-level crate organization:
18//!
19//! - [`scanner`] orchestrates traversal, filtering, and scan execution
20//! - [`license_detection`] extracts license information from files
21//! - [`parsers`] extracts package metadata from ecosystem-specific inputs
22//! - [`copyright`] and [`finder`] extract text clues such as copyrights, emails, and URLs
23//! - [`output`] renders ScanCode-compatible and SBOM-oriented output formats
24//! - [`models`] defines the core scan result data structures
25//!
26//! User-facing installation, CLI usage, supported format coverage, and broader
27//! architecture notes live in the repository documentation. The crate-level
28//! rustdoc stays intentionally concise so fast-changing project details have a
29//! single source of truth outside this file.
30
31extern crate self as provenance;
32
33pub mod assembly;
34pub mod cache;
35pub mod cli;
36pub mod copyright;
37pub mod finder;
38pub mod golden_maintenance;
39pub mod license_detection;
40pub mod models;
41pub mod output;
42pub mod output_schema;
43pub mod parsers;
44pub(crate) mod post_processing;
45pub mod progress;
46pub(crate) mod scan_result_shaping;
47pub mod scanner;
48pub(crate) mod time;
49pub mod utils;
50pub mod version;
51
52pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
53pub use output::{
54 OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
55};
56pub use parsers::{NpmParser, PackageParser};
57pub use progress::{ProgressMode, ScanProgress};
58pub use scanner::{
59 CollectedPaths, ProcessResult, TextDetectionOptions, collect_paths, process_collected,
60};