54 releases (stable)

Uses new Rust 2024

5.0.2 Jan 8, 2026
5.0.0 Dec 5, 2025
4.0.4 Dec 12, 2025
4.0.3 May 10, 2025
0.4.0 Oct 11, 2016

#47 in Unix APIs

Download history 8872/week @ 2025-10-16 8621/week @ 2025-10-23 8058/week @ 2025-10-30 8366/week @ 2025-11-06 8422/week @ 2025-11-13 8363/week @ 2025-11-20 8807/week @ 2025-11-27 9049/week @ 2025-12-04 36933/week @ 2025-12-11 19425/week @ 2025-12-18 14018/week @ 2025-12-25 13561/week @ 2026-01-01 13413/week @ 2026-01-08 12687/week @ 2026-01-15 12328/week @ 2026-01-22 11923/week @ 2026-01-29

52,294 downloads per month
Used in 26 crates (24 directly)

GPL-3.0 license

8.5MB
145K SLoC

PO File 101K SLoC // 0.4% comments C 23K SLoC // 0.1% comments Rust 12K SLoC // 0.0% comments Python 6K SLoC // 0.1% comments AsciiDoc 3K SLoC Shell 290 SLoC // 0.2% comments Pacman's makepkg 46 SLoC // 0.3% comments

alpm.rs - rust bindings for libalpm

Latest version Documentation

alpm.rs provides complete, safe, ergonomic bindings to the libalpm API, the package management library used by pacman and other tools.

Features

  • mtree - enables the alpm_pkg_mtree_* functions
  • generate - generate the raw alpm-sys bindings at build time
  • checkver - check that the version of libalpm installed is compatible with alpm.rs
  • git - target the git master API
  • static - statically link to libalpm

Note: checkver does not work with the git feature. You can instead use the generate feature to ensure alpm.rs builds against a compatible libalpm version.

libalpm compatibility

alpm.rs always targets the latest version of libalpm. It may also support previous versions if the API was not changed.

alpm.rs also supports the pacman git master via the git feature.

Currently alpm.rs supports libalpm v15.x.x.

Note: When using the git feature, alpm.rs is updated against the libalpm git master as commits happen. As the git version is not considered stable software, this is done without bumping the major version.

Documentation

This crate just provides bindings for libalpm and hence does not document libalpm. You can find documentation for libalpm in the libalpm (3) man page or in alpm.h.

There are also examples on how to use the alpm crate in alpm/examples.

alpm-sys

This repo also contains the alpm-sys crate, providing raw bindings for libalpm. Although you probably just want to use the alpm crate instead.

Dependencies