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
28extern crate self as provenance;
29
30pub mod assembly;
31pub mod cache;
32pub mod cli;
33pub mod copyright;
34pub mod finder;
35pub mod golden_maintenance;
36pub mod license_detection;
37pub mod models;
38pub mod output;
39pub mod output_schema;
40pub mod parsers;
41pub(crate) mod post_processing;
42pub mod progress;
43pub(crate) mod scan_result_shaping;
44pub mod scanner;
45pub(crate) mod time;
46pub mod utils;
47pub mod version;
48
49pub use models::{ExtraData, FileInfo, FileType, Header, Output, SystemEnvironment};
50pub use output::{
51 OutputFormat, OutputWriteConfig, OutputWriter, write_output_file, writer_for_format,
52};
53pub use parsers::{NpmParser, PackageParser};
54pub use progress::{ProgressMode, ScanProgress};
55pub use scanner::{
56 CollectedPaths, ProcessResult, TextDetectionOptions, collect_paths, process_collected,
57};