pkg-details 0.1.2

A way to register package details for dependencies.
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 3 items with examples
  • Size
  • Source code size: 3.43 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.43 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Developed-Methods/pkg-details
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • loriopatrick

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