Skip to content

Releases

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 13 Nov 13:35

蜕冗 — moltdisk finds your build output. It does not delete it.

moltdisk walks your projects, finds directories that can be rebuilt from source, ranks them by size, and shows the evidence behind every verdict. Then it stops.

Earlier internal builds of this tool could delete. The guards were serious: a directory only counted as build output when its name and a sibling marker both matched (target/ needed a Cargo.toml, vendor/ a composer.json, Pods/ a Podfile), ambiguous names (dist, build, bin, venv) were off by default, and symlinks, the home directory and anything outside the given roots were refused.

The guards were good, and they were not the point. The point is that "build output" is defined by a project's own build configuration, and that definition lives in the project — not in a rulebook shipped inside a binary. A rulebook can only approximate it. Every approximation has an edge, and on that edge sits the directory someone cannot rebuild: a hand-vendored dependency, a target/ with hand-written files inside, a dist/ that ships with the sources because that is how the project works.

The cost of a wrong heuristic is asymmetric. A wrong line in a report costs a re-run. A wrong deletion costs someone's data — and the person pressing enter is never the person who wrote the rule. This tool runs on machines it has never seen, on projects it knows nothing about, so "usually right" is not a good enough standard for an irreversible act.

So the deleting was removed before the first public release. What is left is the part that was always the interesting part: the judgement, printed in the open.

What that looks like

  • Evidence, not names. A name is not proof. target/ is an ordinary English word. Every rule requires a name match and a marker only a real project of that kind would have, and moltdisk why <path> prints both halves — including the marker it looked for when nothing matched.
  • Ambiguity is opt-in. dist/, build/, bin/ and venv/ stay out of a plain run, because too many project templates use those names for source.
  • The rebuild line is part of the output. moltdisk kinds prints how each kind is regenerated. That line is the actual argument for why a directory is disposable, so it is printed, not filed away in the docs.
  • -y is a hard error. The flag that used to mean "just do it" now explains that the call is yours.

You get the list, the sizes and the reasons. The deletion, if it happens, is yours — with whatever safety you trust. You know your projects; moltdisk only knows its rulebook.

Verify it instead of trusting it

cargo build --release
grep -c remove_dir_all src/*.rs                            # only #[cfg(test)] fixture cleanup
strings target/release/moltdisk | grep -c remove_dir_all   # 0
./target/release/moltdisk -y                               # hard error, not a prompt

In 0.1.0

  • moltdisk scan (the default), moltdisk why <path>, moltdisk kinds
  • 10 kinds, ~40 rules: node, rust, jvm, python, dotnet, php, swift, apple, cache, junk
  • --json, --min-size, --older-than, --depth, --jobs, NO_COLOR
  • Linux x86_64 / aarch64 (static musl), macOS Intel / Apple Silicon, Windows x86_64 — each archive paired with .sha256
  • One dependency (rayon), no unsafe, MSRV 1.80

False positives

A wrong verdict is the only bug that really matters here, because reports get copy-pasted into rm. If moltdisk flags something that cannot be rebuilt, open a false-positive issue with the path, the files next to it, and the output of moltdisk why. A failing test in tests/cli.rs is worth ten screenshots — see CONTRIBUTING.md.