composer-install 0.6.1

Install a resolved composer.lock into a project: download + verify + extract dists in parallel, materialize path packages, apply patches, run the declarative install plugins, dump the autoloader, and link vendor/bin — without running PHP. The pubgrub solver is out of scope; this is the install-from-lock half.
Documentation
//! Install progress reporting — a caller-supplied seam.
//!
//! The downloader runs a two-phase parallel fan-out (download every dist,
//! then extract every dist). It reports per-package progress through this
//! trait so a CLI can drive a progress bar while a library consumer stays
//! silent. The default [`NoProgress`] does nothing; this crate deliberately
//! depends on no rendering library (`indicatif` etc.) — that's the caller's
//! choice.

use crate::downloader::DistOutcome;

/// Per-package progress callbacks fired by the downloader. Both methods have
/// no-op defaults, so an implementor overrides only the phase it cares about.
/// Called from a rayon parallel iterator, so implementations must be `Sync`
/// and cheap/non-blocking.
pub trait Progress: Sync {
    /// The downloader is about to fetch `dists` archives (cache hits
    /// included). Fires once, before any other callback, so a bar can set its
    /// length.
    fn on_start(&self, dists: usize) {
        let _ = dists;
    }

    /// One dist finished its download phase — either freshly fetched or a
    /// cache hit (see [`DistOutcome`]). Fires once per package.
    fn on_download(&self, package: &str, outcome: DistOutcome) {
        let _ = (package, outcome);
    }

    /// One dist finished extracting into its `vendor/` destination. Fires
    /// once per package, after every download has completed.
    fn on_extract(&self, package: &str) {
        let _ = package;
    }

    /// A fetch attempt for `package` failed and is about to be retried.
    /// `attempt` counts the failures so far (1 on the first retry). Fired by
    /// fetchers that retry, such as [`crate::ReqwestFetcher`]; a final
    /// failure is returned as an error instead.
    fn on_retry(&self, package: &str, attempt: u32, error: &eyre::Report) {
        let _ = (package, attempt, error);
    }
}

/// The silent default: reports nothing. Suitable for library use and for the
/// non-interactive / `--quiet` / machine-output CLI paths.
#[derive(Debug, Clone, Copy, Default)]
pub struct NoProgress;

impl Progress for NoProgress {}