#arch-linux #config-parser #pacman #arch #conf

pacmanconf

A pacman-conf wrapper library for parsing pacman config files

9 releases (4 stable)

3.0.0 Aug 28, 2024
2.1.0 Mar 7, 2024
2.0.0 Feb 16, 2022
1.0.0 Apr 23, 2021
0.1.0 Mar 9, 2019

#281 in Parser implementations

Download history 4181/week @ 2024-08-17 4662/week @ 2024-08-24 4584/week @ 2024-08-31 5094/week @ 2024-09-07 19219/week @ 2024-09-14 13878/week @ 2024-09-21 8735/week @ 2024-09-28 7313/week @ 2024-10-05 6667/week @ 2024-10-12 5668/week @ 2024-10-19 5564/week @ 2024-10-26 4825/week @ 2024-11-02 4675/week @ 2024-11-09 4485/week @ 2024-11-16 4343/week @ 2024-11-23 4408/week @ 2024-11-30

18,603 downloads per month
Used in 13 crates (10 directly)

GPL-3.0 license

36KB
675 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