Counts installed RPM packages using librpm
.
Note: This crate does not make use of
librpm-sys
but links to the C library itself.
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).
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:
```rs use rpmpkgcount::count;
fn main() { println!("{} packages installed", unsafe { count() }); } ```