Module install

Module install 

Source
Expand description

End-to-end installation workflow for winbrew install.

This module owns the full package installation pipeline once a package reference has been handed off by the CLI layer. The workflow is intentionally split into small submodules so each phase has a clear responsibility:

  • state manages database transitions and rejects conflicting installs.
  • download builds the network client and downloads the installer payload.
  • flow coordinates the download, engine execution, and rollback paths.
  • plan builds read-only install previews for the CLI.
  • types normalizes lower-level failures into user-facing install errors.

The public entry point is run. It resolves the package reference against the catalog, selects the installer, creates a temporary workspace, streams download progress through InstallObserver, and either commits the final install record or rolls back all partial state on failure.

Checksum handling is strict by default. Legacy algorithms such as MD5 and SHA-1 are rejected unless the caller explicitly opts into ignore_checksum_security. When that flag is enabled, the accepted legacy algorithms are still returned in InstallOutcome so the caller can report what was tolerated during verification.

Re-exportsยง

pub use types::InstallError;

Modulesยง

cancel
Cancellation support for long-running CLI and workflow operations.
download
Download and verification helpers for installer payloads.
flow
Orchestration helpers for the middle and final phases of installation.
plan
sevenz ๐Ÿ”’
state
Database and filesystem state helpers for installation.
types
Error normalization and installer-selection helpers for installation.

Structsยง

CatalogPackage
A validated catalog package entry.
InstallOutcome
Full outcome of an install attempt.
InstallPhaseGuard ๐Ÿ”’
InstallResult
The successful result of an install flow.
ResolvedInstallTarget ๐Ÿ”’
TempRootGuard ๐Ÿ”’

Enumsยง

InstallFailureClass
Failure buckets used by install orchestration and user-facing errors.
PackageRef
A package reference provided by callers or CLI commands.

Traitsยง

InstallObserver
Interactive hooks used by the installation pipeline.

Functionsยง

ensure_install_dirs ๐Ÿ”’
resolve_install_target ๐Ÿ”’
run
Execute the full install workflow for a resolved package reference.
write_install_journal ๐Ÿ”’

Type Aliasesยง

Result