Expand description
High-level deploy orchestration — the engine behind
krypt link / krypt unlink / krypt relink.
Stages of a link:
- Load
.krypt.toml(withinclude = [...]expansion). - Build a
Resolver(optionally pinned to a non-hostPlatformfor testing). - Apply
[paths]overrides from the config. - Build a [
Plan]. - Load the existing
Manifest(if any). - Narrow conflicts: for each
Action::Conflictin the plan, check the manifest — if the recordedhash_dstmatches the current file on disk, the destination is “ours” and a re-deploy is safe; promote to aAction::Copy. Ifforceis set, promote everything. - Execute the plan.
- Update the manifest with what was written, save atomically.
unlink is the inverse: iterate the manifest, hash each dst,
delete only entries that still match the recorded hash (i.e.
haven’t drifted). With force, delete regardless of drift.
relink = unlink + link.
Structs§
- Deploy
Opts - Knobs for
link/unlink/relink. - Link
Report - Summary returned by
link. - Unlink
Report - Summary returned by
unlink.
Enums§
- Deploy
Error - Anything that can go wrong during a deploy.
Functions§
- link
- Deploy every entry in the config. Idempotent — re-runs over a clean state make no changes.
- relink
- Convenience:
unlinkfollowed bylink. Useful after large config edits where you want a clean redeploy. - unlink
- Remove every entry recorded in the manifest. Drifted destinations are
skipped unless
forceis set.