Expand description
External dependency bootstrap — install the binaries pawan shells out to.
Pawan depends on a few external tools that aren’t pulled in by
cargo install pawan:
mise— polyglot tool/runtime manager (needed to install the rest)rg,fd,sd,ast-grep,erd— native search/replace/tree tools (auto-installed via mise on first tool use, but only if mise is present)
As of the Option B rewrite, deagle is NO LONGER an external dep:
deagle-core and deagle-parse are embedded directly into pawan as
library crates, so all 5 deagle tools work out of the box. The
ensure_deagle function still exists for backwards compatibility
(and for users who want the standalone deagle CLI on PATH for
interactive use), but it’s opt-in via --include-deagle and not
part of the default bootstrap.
This module provides an idempotent, reversible install path so that
cargo install pawan && pawan bootstrap is enough to get a working
setup — no manual tool wrangling. Each step is non-destructive: it
checks which <binary> first and skips if the binary is already on
PATH, unless force_reinstall is set.
§Reversibility
uninstall removes the marker file and optionally runs
cargo uninstall deagle (only if --purge-deagle is passed, and
only if the user had opted in to installing it). It deliberately
does NOT touch mise or mise-managed tools because those may be used
by other programs on the system.
Structs§
- Bootstrap
Options - Options for a bootstrap run.
- Bootstrap
Report - Summary of a bootstrap run — one
BootstrapStepper dependency. - Bootstrap
Step - One line of a bootstrap report.
Enums§
- Bootstrap
Step Status - The outcome of installing (or trying to install) a single dependency.
Constants§
- NATIVE_
TOOLS - The native tools managed by mise. Must match the tool names pawan
uses at runtime in
tools/native.rs.
Functions§
- binary_
exists - Check if a binary is available on PATH.
- ensure_
deagle - Install deagle via
cargo install --locked deagle. Idempotent — if deagle is already on PATH andforceis false, returnsAlreadyInstalledwithout shelling out. - ensure_
deps - Run the full bootstrap sequence per the options. On success (
all_okreturns true), writes a marker file atmarker_pathcontaining the install timestamp. - ensure_
mise - Install mise via
cargo install --locked mise. Idempotent — skipped if mise is already on PATH or at~/.local/bin/mise(mise’s default install location, which may not yet be on PATH). - ensure_
native_ tool - Install a native tool via mise. Requires mise to already be on PATH
(or at
~/.local/bin/mise) — returns Skipped otherwise so the caller can decide how to surface that. - is_
bootstrapped - True if every REQUIRED external dep is on PATH. Deagle is excluded because pawan embeds deagle-core + deagle-parse as library deps — the standalone binary is no longer required.
- marker_
path - Path to the “this pawan has been bootstrapped” marker file. The presence of this file is how startup knows to skip the auto-bootstrap prompt on subsequent runs.
- missing_
deps - List of REQUIRED dep names that are NOT on PATH. Deagle is excluded
because pawan embeds it directly — see
is_bootstrapped. Used bypawan doctorand the CLIbootstrap --dry-runflag. - uninstall
- Reverse the bootstrap: remove the marker file, and optionally run
cargo uninstall deagle. Deliberately does NOT uninstall mise or mise-managed tools — those may be used by other programs.