Simple way to dump crate dependencies / versions

I have some About dialog for application, where want to print all software versions used in application like GTK, Glib, Gio, Pango etc (for bug report)

Currently, using environment variables like env!("CARGO_PKG_NAME") or env!("CARGO_PKG_VERSION") but maybe some build-in method exist for these needs, where I can collect entire system info to the array, for example?

Also, would be useful to get hardware details like RAM, CPU, etc where user can simply copy and paste into the Issue opened on Github.

Or maybe some crate for these needs?
Thanks

I'm not sure that I understand your request, but maybe those commands are of use to you?

1 Like

Thanks for reply, but I meant some way to collect package info into the application widget. For example, I have this About dialog in GTK, where manually extract every package name by it key.

So maybe available simpler way, to print entire system info with crate dependencies/versions.

Seems my question is not constructive and I must implement debug information manually, according to the application needs.

Still doubts do I really want these lines in lib.rs to get library version in the external crate

// lib.rs
pub const VERSION: &str = env!("CARGO_PKG_VERSION");

pub const VERSION_MINOR: &str = env!("CARGO_PKG_VERSION_MINOR");
pub const VERSION_MAJOR: &str = env!("CARGO_PKG_VERSION_MAJOR");
pub const VERSION_PATCH: &str = env!("CARGO_PKG_VERSION_PATCH");

Are you looking for something like cargo-about, that lists information about the dependencies? This one is mainly for crediting open source software, but seems very customizable.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.