#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

#264 in Parser implementations

Download history 4494/week @ 2024-07-29 4849/week @ 2024-08-05 4388/week @ 2024-08-12 4221/week @ 2024-08-19 4745/week @ 2024-08-26 4581/week @ 2024-09-02 9896/week @ 2024-09-09 18321/week @ 2024-09-16 11464/week @ 2024-09-23 8073/week @ 2024-09-30 7167/week @ 2024-10-07 6382/week @ 2024-10-14 5516/week @ 2024-10-21 5479/week @ 2024-10-28 4761/week @ 2024-11-04 4641/week @ 2024-11-11

21,308 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