Crate zoi

Crate zoi 

Source
Expand description

§Zoi: The Universal Package Manager & Environment Setup Tool

This crate provides the core functionality of Zoi as a library, allowing other Rust applications to leverage its package management and environment setup capabilities.

§Getting Started

To use Zoi as a library, add it as a dependency in your Cargo.toml:

[dependencies]
zoi = { version = "1.0.0" } // Replace with the desired version

§Example: Install a package

use zoi::{install_package, Scope};
use std::path::Path;
use anyhow::Result;

fn main() -> Result<()> {
    let archive_path = Path::new("path/to/your/package-1.0.0-linux-amd64.pkg.tar.zst");
    let scope = Some(Scope::User);
    let registry_handle = "local";

    let installed_files = install_package(archive_path, scope, registry_handle)?;

    println!("Package installed successfully. {} files were installed.", installed_files.len());

    Ok(())
}

For more detailed documentation, see the Zoi Documentation Hub. For more library examples, see the Library Examples page.

Re-exports§

pub use pkg::types;
pub use pkg::types::Scope;

Modules§

cli
cmd
pkg
project
utils

Functions§

build
Builds a Zoi package from a local .pkg.lua file.
install_package
Installs a Zoi package from a local package archive.
uninstall_package
Uninstalls a Zoi package.