#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

#355 in Parser implementations

Download history 19758/week @ 2024-09-15 12403/week @ 2024-09-22 8379/week @ 2024-09-29 7287/week @ 2024-10-06 6438/week @ 2024-10-13 5579/week @ 2024-10-20 5573/week @ 2024-10-27 4767/week @ 2024-11-03 4645/week @ 2024-11-10 4444/week @ 2024-11-17 4325/week @ 2024-11-24 4451/week @ 2024-12-01 4673/week @ 2024-12-08 4589/week @ 2024-12-15 4895/week @ 2024-12-22 3931/week @ 2024-12-29

18,777 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