Releases: ml-rust/cargo-reclaim
Releases · ml-rust/cargo-reclaim
Release list
cargo-reclaim 0.3.0
Changelog
Added
- Split the
[background]watcher into independent, composable trigger blocks:[background.periodic](fires on a timer) and[background.trigger](fires on a poll). Configure either or both, so a routine cadence and a responsive disk-pressure gate can run at once — the latter can trim the instant free space crosses a threshold instead of waiting for the next periodic pass. - Introduced the limiter concept, orthogonal to the trigger: each block may carry
only_when_disk_free_below,min_free_disk, ormax_target_size. With no limiter a fired run always cleans; with a limiter it cleans only when a threshold is breached. Disk limiters use a cheap free-space check;max_target_sizescans target sizes. - Surfaced non-fatal config deprecation notices through
ReclaimConfig::deprecations, printed as warnings by the scheduler commands.
Changed
modeis no longer a[background]key; how a run is triggered is now expressed by the presence of theperiodic/triggerblocks. Policy and budget config still govern what a run removes and how much.
Deprecated
- The flat
[background]keysmode,check_every,only_when_disk_free_below, andmin_free_diskare still accepted and normalized into the new blocks (with a warning), and will be removed in 0.4.mode = "periodic"maps to a[background.periodic]block;mode = "threshold"maps to a[background.trigger]block that inherits[policy].max_target_sizeas a limiter.
Fixed
- Kept the background inventory from aborting a run when a concurrent
cargo builddeletes an artifact (for example adeps/*.rcgu.oobject file) between directory enumeration and the snapshot's stat; the vanished path is now skipped like the stale-deps and stale-incremental passes already did, instead of failing the run.
Diff
cargo-reclaim 0.2.2
Changelog
Fixed
- Rejected a
plan --jsondry-run report (or an unrecognized file) passed toapply --plan,edit-plan --plan, orcargo-home apply --planwith an actionable error that points at--save-plan, instead of a raw serialization error about a missingidfield (#1). - Discovered a shared
CARGO_TARGET_DIRorbuild.target-dirthat lives on a different filesystem than the project root without requiring--cross-filesystems; the flag now governs incidental traversal only, not explicitly configured output locations (#2). - Recognized a cargo target directory by its
.rustc_info.jsonmarker regardless of directory name, so a shared target directory named e.g.cargo-targetis listed and cleanable; the genericCACHEDIR.TAGmarker still requires the conventionaltargetname (#2).
Changed
- Explained empty
listresults, distinguishing "no Rust project found under the scanned roots" from "Rust projects found, but no cleanable target directories," in both terminal and JSON output.
Diff
cargo-reclaim 0.2.1
Changelog
Fixed
- Summarized foreground cleanup/apply terminal output by default and wrote complete per-run JSON reports under the cargo-reclaim state directory.
Diff
cargo-reclaim 0.2.0
Changelog
Changed
- Made
cargo-reclaim <roots...>the primary cleanup assistant entrypoint, with smart trim as the default cleanup mode for active projects. - Made
cargo-reclaim list <roots...>the read-only target inventory surface and removed the old publictargetscommand surface. - Moved explicit whole-target deletion to the cleanup assistant path with
--target <path> --delete-target --yes, keeping whole-target cleanup separate from default smart trim. - Updated CLI help, JSON inventory output, README examples, and release preparation metadata around the 0.2.0 command model.
Added
- Real terminal assistant coverage for selector, mode, confirmation, cancellation, page-skipping flags, and non-TTY guard behavior.
- Deterministic CLI integration test isolation from live cargo/rustc process scans.
Fixed
- Improved target inventory sizing throughput and stale plan-test stability before the 0.2.0 release.
Diff
cargo-reclaim 0.1.1
Changelog
Fixed
- Support Cargo subcommand invocation through
cargo reclaim ...by accepting Cargo's leadingreclaimshim argument before normal command parsing.
Diff
cargo-reclaim 0.1.0
Changelog
First release of cargo-reclaim: safe Cargo artifact cleanup for real Rust workstations.
Added
Planning and apply
- Read-only scan and plan workflows for Cargo target directories.
- Persisted cleanup plans with expiration and apply-time revalidation.
- Policy modes:
observe,conservative,balanced,aggressive, andcustom. - Ignore, skip, recent-write, keep-size, and rustc/toolchain preservation controls.
Target cleanup
- Cargo target discovery from project roots, Cargo configuration, and target-root evidence.
- Interactive target directory discovery and selected whole-target cleanup through
cargo-reclaim targetsandcargo-reclaim targets clean. - Partial cleanup classes for incremental artifacts, fingerprints, build-script caches, dep-info files, temporary files, object metadata, stale fingerprint-group intermediates, stale hashed
depsvariants, old deps outputs guarded by recent-write windows, and stale incremental sessions or unit variants. - Protected classes for whole targets, docs, packages, timings, final binaries, final libraries, final
.rlib, final.wasm, and unknown artifacts.
Cargo home
- Cargo home cache reporting.
- Cargo home cleanup plans and saved-plan apply.
Scheduler
- Config-driven scheduler execution.
- Resident scheduler service support with platform preview/install/uninstall flows for Linux
systemd-user, macOSlaunchd, and Windows Task Scheduler. - Active
cargo/rustcprocess detection on Linux through procfs and on macOS/Windows through a native process-table provider. - Threshold background cleanup with per-target size ceilings, target size goals, absolute free-space triggers, and durable service state.
- Durable scheduler run logs and state directories.
Cargo config
- Read-only Cargo config recommendations.
- Cargo config preview and explicit apply flow.
Documentation and automation
- Saved plan editing with list, selector, and interactive modes.
- JSON output for automation-friendly scan, plan, scheduler, target, and Cargo home workflows.
- Deep directory measurement for CLI, scheduler, and background service planning, so cleanup budgets and reported sizes reflect real directory contents.
- Scheduler service status that keeps
runningwhen PID liveness cannot be inspected from the current environment instead of falsely reporting a stale service.
Safety
- Destructive flows require explicit confirmation with
--yes. - Saved apply flows revalidate path kind, size, modification time, and symlink state before deletion.
- Whole-target deletion remains separate from partial artifact trimming and requires explicit selected target cleanup or whole-target policy configuration.