2 releases
Uses old Rust 2015
0.1.4 | Oct 31, 2018 |
---|---|
0.1.3 | Oct 31, 2018 |
#94 in #arch-linux
115KB
2.5K
SLoC
libalpm (A wrapper round libalpm, the Arch Linux Package Manager)
This fork compiles on stable rust: https://crates.io/crates/libalpm-fork
The code is taken from here: https://github.com/jameslzhu/alpm and published. Unfortunately, the real author of the code didn't publish it.
Hopefully it'll be resolved over time and "jameslzhu" will publishe their code themselves.
I've changed some function names to match rust convention (e.g. no 'get',
get_value() => value()
, no shortened words desc => description
).
Currently linux-only.
lib.rs
:
A library to access the functionality of libalpm (the library used by pacman).
Getting started
The main struct here is Alpm
. It is responsible for wrapping an alpm database and filesystem,
and providing functionality for thtat alpm instance. For example...
use libalpm::Alpm;
use libalpm::util;
// get the architecture (e.g. x86_64).
let arch = util::uname().machine().to_owned();
let alpm = Alpm::new("/", "/var/lib/pacman"); // default locations on arch linux
Dependencies
~4.5MB
~90K SLoC