libmangrove 0.1.2

The core library for Mangrove, a pure-rust, blazing fast package manager
Documentation
//! # libmangrove
//! `libmangrove` is a Rust implementation of the Mangrove packaging system.
//! It is maintained by the same developers as the spec itself, and as such is the official reference implementation.
//! This library is currently maintained against the Mangrove Technical Specification, revision 1.
//! You can find it at https://mgve.cc/spec/mangrove_tech_spec_r1.pdf.
//!
//! This library does not a CLI, it's just an implementation of the packaging operations.
//! If you're looking for the CLI, check out mangrove-cli, which uses this library.

// Configure the linter
#![warn(clippy::pedantic)]
#![warn(clippy::nursery)]

// Bad practice for libraries
#![deny(missing_docs)]
#![deny(clippy::unwrap_used)]
#![deny(clippy::expect_used)]
#![deny(clippy::missing_errors_doc)]
#![deny(clippy::missing_panics_doc)]
#![deny(clippy::missing_safety_doc)]

// Turn off the obnoxious lints
#![allow(clippy::must_use_candidate)]
#![allow(clippy::too_many_lines)]
#![allow(clippy::module_name_repetitions)]

#[cfg(test)]
pub mod tests;

pub mod target;

///// VERSIONING STUFF /////

/// Get the cargo package version.
pub fn pkgver() -> String {
    env!("CARGO_PKG_VERSION").to_string()
}
/// Get the Mangrove spec revision this library was built for
pub fn specver() -> String {
    "1.0".to_string()
}
/// Get the short version string
pub fn version() -> String {
    format!("libmangrove {} ({})", pkgver(), mcrypt::version())
}
/// Get the detailed version string
pub fn detailed_version() -> String {
    format!("libmangrove {} for spec version {} built at {}, rustc {}/{}\n{}", pkgver(), specver(), env!("VERGEN_BUILD_TIMESTAMP"), env!("VERGEN_RUSTC_SEMVER"), env!("VERGEN_RUSTC_CHANNEL"), mcrypt::detailed_version())
}