Crates.io | pkg-details |
lib.rs | pkg-details |
version | |
source | src |
created_at | 2025-05-07 16:39:22.018906+00 |
updated_at | 2025-05-07 18:50:46.078395+00 |
description | A way to register package details for dependencies. |
homepage | |
repository | https://github.com/Developed-Methods/pkg-details |
max_upload_size | |
id | 1664091 |
Cargo.toml error: | TOML parse error at line 17, column 1 | 17 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.
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);
}