3 releases
Uses new Rust 2024
0.1.2 | May 7, 2025 |
---|---|
0.1.1 | May 7, 2025 |
0.1.0 | May 7, 2025 |
#75 in #details
444 downloads per month
Used in 4 crates
(2 directly)
3KB
pkg-details
Why does this exist?
Sometimes dependencies want to know what the application's package name and version is. Think logging or metric libraries. This crate provides a way for the application to register its details so downstream dependencies can read them.
Usage
fn main() {
pkg_details::init!();
}
## In a library / dependency
fn setup_logging() {
let details = pkg_details::get();
println!("Starting logging, pkg: {}, version: {}", details.pkg_name, details.pkg_version);
}