#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

#274 in Parser implementations

Download history 5471/week @ 2024-04-03 4676/week @ 2024-04-10 4401/week @ 2024-04-17 4236/week @ 2024-04-24 4501/week @ 2024-05-01 4439/week @ 2024-05-08 4677/week @ 2024-05-15 4682/week @ 2024-05-22 4366/week @ 2024-05-29 4476/week @ 2024-06-05 4279/week @ 2024-06-12 4389/week @ 2024-06-19 4055/week @ 2024-06-26 4052/week @ 2024-07-03 4199/week @ 2024-07-10 3549/week @ 2024-07-17

16,480 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