#details #package #register #version #metrics

pkg-details

A way to register package details for dependencies

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

Download history 333/week @ 2025-05-05 106/week @ 2025-05-12 5/week @ 2025-05-19

444 downloads per month
Used in 4 crates (2 directly)

MIT license

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);
}

No runtime deps