// SPDX-FileCopyrightText: 2024 Simon Bruder <simon@sbruder.de>
//
// SPDX-License-Identifier: LGPL-2.1-or-later
//! Proc-macro for embedding licensing information about a crate.
//!
//! It also exposes its internal functions that allow
//! either collecting licensing information at runtime (with [`collect()`]),
//! when in the directory of the manifest,
//! or collecting licensing information from a specific manifest file (with
//! [`collect_from_manifest`]).
//!
//! However, the recommended way to use this crate is the macro [`collect!`]:
//!
//! ```rust
//! let licensing = embed_licensing::collect!();
//!
//! for package in licensing.packages {
//! if let embed_licensing::CrateLicense::SpdxExpression(expr) = package.license {
//! println!("{} {} ({})", package.name, package.version, expr);
//! } else {
//! println!("{} {} uses custom license", package.name, package.version);
//! }
//! }
//! ```
pub use embed_licensing_core::{
collect, collect_from_manifest, Crate, CrateLicense, Error, Licensing,
};
pub use embed_licensing_macros::collect;