README.md 1.77 KB
Newer Older
Morgan Adamiec's avatar
Morgan Adamiec committed
1
2
3
4
5
#  alpm.rs - rust bindings for libalpm

[![Latest version](https://img.shields.io/crates/v/alpm.svg)](https://crates.io/crates/alpm)
[![Documentation](https://docs.rs/alpm/badge.svg)](https://docs.rs/alpm)

Morgan Adamiec's avatar
Morgan Adamiec committed
6
alpm.rs provides complete, safe, ergonomic bindings to the libalpm API,
Morgan Adamiec's avatar
Morgan Adamiec committed
7
8
9
10
the package management library used by pacman and other tools.

# Features

Marcel Walk's avatar
Marcel Walk committed
11
- mtree - enables the alpm_pkg_mtree_* functions
Morgan Adamiec's avatar
Morgan Adamiec committed
12
13
14
- 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
Morgan Adamiec's avatar
Morgan Adamiec committed
15
- static - statically link to libalpm
Morgan Adamiec's avatar
Morgan Adamiec committed
16
17
18
19
20
21
22
23
24
25
26
27


**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.

Morgan Adamiec's avatar
Morgan Adamiec committed
28
Currently alpm.rs supports libalpm v13.x.x.
Morgan Adamiec's avatar
Morgan Adamiec committed
29
30
31
32
33

**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.

34
35
36
# Documentation

This crate just provides bindings for libalpm and hence does not document libalpm.
Morgan Adamiec's avatar
Morgan Adamiec committed
37
You can find documentation for libalpm in the [libalpm (3)](https://man.archlinux.org/man/core/pacman/libalpm.3.en) man page or in [alpm.h](https://gitlab.archlinux.org/pacman/pacman/-/blob/master/lib/libalpm/alpm.h).
38

Marcel Walk's avatar
Marcel Walk committed
39
There are also examples on how to use the alpm crate in [alpm/examples](alpm/examples).
Morgan Adamiec's avatar
Morgan Adamiec committed
40

Morgan Adamiec's avatar
Morgan Adamiec committed
41
42
43
44
# 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.