Skip to main content

run

Function run 

Source
pub fn run(
    sources: &[String],
    repo: Option<String>,
    force: bool,
    all_optional: bool,
    yes: bool,
    scope: Option<InstallScope>,
    local: bool,
    global: bool,
    save: bool,
    build_type: Option<String>,
    dry_run: bool,
    plugin_manager: Option<&PluginManager>,
    build: bool,
    frozen: bool,
    explain: bool,
    plan_json: bool,
    retry: u32,
    verbose: bool,
    purl: bool,
    project_config: Option<ProjectConfig>,
) -> Result<()>
Expand description

The primary high-level orchestration for the zoi install command.

This function coordinates:

  • Context Resolution: Decides between global, user, or project-local scopes.
  • Dependency Resolution: Triggers the SAT solver to build the dependency graph.
  • Safety Checks: Validates policy compliance, security advisories, and file conflicts.
  • Transactional Execution: Executes the install plan within an atomic transaction.
  • Lockfile Updates: Synchronizes zoi.lock for project-local installations.