#arch-linux #pacman #conf

pacmanconf

A pacman-conf wrapper library for parsing pacman config files

10 releases (5 stable)

3.1.0 Nov 2, 2025
3.0.0 Aug 28, 2024
2.1.0 Mar 7, 2024
2.0.0 Feb 16, 2022
0.1.0 Mar 9, 2019

#411 in Parser implementations

Download history 8292/week @ 2025-10-19 7942/week @ 2025-10-26 7650/week @ 2025-11-02 7959/week @ 2025-11-09 7733/week @ 2025-11-16 8054/week @ 2025-11-23 8272/week @ 2025-11-30 13076/week @ 2025-12-07 20754/week @ 2025-12-14 11572/week @ 2025-12-21 10523/week @ 2025-12-28 10828/week @ 2026-01-04 10778/week @ 2026-01-11 9817/week @ 2026-01-18 9927/week @ 2026-01-25 9823/week @ 2026-02-01

41,954 downloads per month
Used in 13 crates (10 directly)

GPL-3.0 license

37KB
681 lines

PacmanConf

pacmanconf is a simple parser for pacman config files.

use pacmanconf::Config;

let config = Config::new().expect("failed to parse config");

let config = Config::options()
    .root_dir("/chroot")
    .pacman_conf("tests/pacman.conf")
    .read()
    .expect("failed to parse config");

    for repo in &config.repos {
        println!("{}", repo.name);
    }

See Config and Options on how to use this library.

Dependencies