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

pacmanconf

A pacman-conf wrapper library for parsing pacman config files

8 releases (3 stable)

2.1.0 Mar 7, 2024
2.0.0 Feb 16, 2022
1.0.0 Apr 23, 2021
0.2.0 Nov 29, 2020
0.1.0 Mar 9, 2019

#299 in Parser implementations

Download history 4567/week @ 2023-12-25 4384/week @ 2024-01-01 4202/week @ 2024-01-08 4235/week @ 2024-01-15 4252/week @ 2024-01-22 4078/week @ 2024-01-29 4124/week @ 2024-02-05 4005/week @ 2024-02-12 3861/week @ 2024-02-19 3862/week @ 2024-02-26 4368/week @ 2024-03-04 12073/week @ 2024-03-11 12558/week @ 2024-03-18 7781/week @ 2024-03-25 5945/week @ 2024-04-01 2759/week @ 2024-04-08

32,054 downloads per month
Used in 13 crates (10 directly)

GPL-3.0 license

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