#config-parser #arch-linux #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

#380 in Parser implementations

Download history 4485/week @ 2024-11-16 4343/week @ 2024-11-23 4432/week @ 2024-11-30 4638/week @ 2024-12-07 4621/week @ 2024-12-14 4891/week @ 2024-12-21 4622/week @ 2024-12-28 4561/week @ 2025-01-04 4396/week @ 2025-01-11 4250/week @ 2025-01-18 4333/week @ 2025-01-25 4667/week @ 2025-02-01 4545/week @ 2025-02-08 4585/week @ 2025-02-15 4790/week @ 2025-02-22 4101/week @ 2025-03-01

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