rpm-pkg-count 0.1.0

Counts installed RPM packages using librpm
docs.rs failed to build rpm-pkg-count-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: rpm-pkg-count-0.2.1

rpm-pkg-count

Counts installed RPM packages using librpm.

Note: This crate does not make use of librpm-sys but links to the C library itself.

Requirements

In order to compile this crate, one must have librpm installed on the system. It is usually provided by package managers under the name rpm-devel (e.g., OpenSUSE), rpm-tools (e.g., Arch Linux) or librpm-dev (e.g., Debian).

Usage

The crate exposes exaclty one public function which takes no arguments and returns the package count as a u32. An example usage is shown here:

use rpm_pkg_count::count;

fn main() {
    println!("{} packages installed", unsafe { count() });
}