Whoops, though I included it in the title, I forgot to mention: I also took a shot at writing some Rust bindings to librpm/rpmlib, after first generating bindings using bindgen:

https://github.com/iqlusion-io/crates/tree/master/rpmlib

I've gotten some great feedback from upstream RPM developers, particularly around the mistakes of previous bindings:

https://github.com/rpm-software-management/rpm/issues/429

I'm still not super happy with the code on master, but I think I have a path forward that should balance performance and memory safety concerns. I also deliberately plan on exposing as few features as possible in the public API, at least initially, as it seems a common problem with previous bindings was exposing all of rpmlib's functionality including things characterized as misfeatures by RPM's developers.

I should also note I'd be happy to upstream either of these projects to the right home (and already have some interest on upstreaming the librpm/rpmlib code to RPM itself), and am happy to relicense it or do whatever is needed.

--
Tony Arcieri