eix

Crates.ioeix
lib.rseix
version0.4.0
created_at2026-01-05 10:32:04.127436+00
updated_at2026-01-13 10:44:25.499173+00
descriptionLibrary for handling the EIX-file format of Gentoo Linux
homepage
repositoryhttps://github.com/Komplix/eix-lib
max_upload_size
id2023580
size104,799,963
Andreas F. (thataf)

documentation

README

eix

github crates.io Build maintenance-status

A Rust library to parse and search the Gentoo Linux Portage Package Manager eix database format.

Usage

use eix::{Database, PackageReader};

fn main() -> std::io::Result<()> {
    let mut db = Database::open_read("/var/cache/eix/portage.eix")?;
    let header = db.read_header(0)?;
    let mut reader = PackageReader::new(db, header);

    while reader.next_category()? {
        let category = reader.current_category();
        while let Some(pkg) = reader.read_package()? {
            println!("{}/{}: {}", category, pkg.name, pkg.description);
        }
    }
    Ok(())
}

Examples

eix2json

The library includes an example tool eix2json that converts an eix database to JSON format.

cargo run --example eix2json -- /var/cache/eix/portage.eix output.json

If no output file is specified, it will output to stdout.

eix_version_masks

The example eix_version_masks displays all versions of each package along with their mask flags and other metadata.

cargo run --example eix_version_masks -- /var/cache/eix/portage.eix

License

Licensed under either of

at your option.

Commit count: 15

cargo fmt