| Crates.io | eix |
| lib.rs | eix |
| version | 0.4.0 |
| created_at | 2026-01-05 10:32:04.127436+00 |
| updated_at | 2026-01-13 10:44:25.499173+00 |
| description | Library for handling the EIX-file format of Gentoo Linux |
| homepage | |
| repository | https://github.com/Komplix/eix-lib |
| max_upload_size | |
| id | 2023580 |
| size | 104,799,963 |
A Rust library to parse and search the Gentoo Linux Portage Package Manager eix database format.
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(())
}
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.
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
Licensed under either of
at your option.