provenant/lib.rs
1//! # Provenant
2//!
3//! `provenant` is the library crate behind the `provenant` CLI. It
4//! provides ScanCode-compatible scanning, package parsing, and output-writing
5//! building blocks for Rust applications.
6//!
7//! The main entry points are:
8//!
9//! - [`collect_paths`] to discover files in a directory tree
10//! - [`process_collected`] to scan collected files in parallel
11//! - [`OutputFormat`], [`OutputWriter`], and [`write_output_file`] to serialize scan results
12//! - [`parsers`] and [`models`] for lower-level package parsing and result inspection
13//!
14//! High-level crate organization:
15//!
16//! - [`scanner`] orchestrates traversal, filtering, and scan execution
17//! - [`license_detection`] extracts license information from files
18//! - [`parsers`] extracts package metadata from ecosystem-specific inputs
19//! - [`copyright`] and [`finder`] extract text clues such as copyrights, emails, and URLs
20//! - [`output`] renders ScanCode-compatible and SBOM-oriented output formats
21//! - [`models`] defines the core scan result data structures
22//!
23//! User-facing installation, CLI usage, supported format coverage, and broader
24//! architecture notes live in the repository documentation. The crate-level
25//! rustdoc stays intentionally concise so fast-changing project details have a
26//! single source of truth outside this file.
27
28pub mod assembly;
29pub mod cache;
30pub mod cli;
31pub mod copyright;
32pub mod finder;
33pub mod golden_maintenance;
34pub mod license_detection;
35pub mod models;
36pub mod output;
37pub mod parsers;
38pub mod progress;
39pub mod scanner;
40pub mod utils;
41
42#[cfg(test)]
43pub mod test_utils;
44
45pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
46pub use output::{
47 OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
48};
49pub use parsers::{NpmParser, PackageParser};
50pub use progress::{ProgressMode, ScanProgress};
51pub use scanner::{
52 CollectedPaths, ProcessResult, TextDetectionOptions, collect_paths, process_collected,
53};