Skip to content

Building from Source

Daniel Struis edited this page Aug 17, 2026 · 5 revisions

Building from source

ClutterCutter is written in Rust. (The original C# implementation was removed in v0.9.2 — Rust is now the one and only build.) Contributors should read AGENTS.md for the full dev workflow, architecture, and conventions.

Building

Needs the Rust stable toolchain.

cd rust
cargo build --release   # -> rust/target/release/cluttercutter.exe

The release build is copied to ClutterCutter.exe — the single, self-contained executable that ships on the releases page and via winget.

There's also a console harness for testing the scanners without the GUI:

cargo run --bin cluttercutter-cli -- --top-n 20 C:\Users

Keep the tree cargo fmt-clean and cargo clippy --release-clean.

Tests & coverage

cd rust
cargo test                       # unit tests for the logic modules

The GUI is a large body of unsafe Win32 code (window procedures, GDI, list-view messages) that can't be meaningfully unit-tested without a live desktop, so the tests target the pure logic instead: byte/size/count formatting, the top-/oldest-files heap queries, temp-location discovery, the directory walker, and the MFT record/data-run parsers. Coverage on those modules runs high (formatting and types at 100%, analysis ~95%, the walker ~87%, temp ~83%). To measure it yourself:

cargo install cargo-llvm-cov      # one-time
cargo llvm-cov --lib --summary-only

Cross-platform (in progress)

The native GUI is built on unsafe Win32 and is Windows-only today. Work toward a cross-platform build is underway: the portable scan core now compiles for Linux, and the cluttercutter-cli console tool (above) runs there. A cross-platform egui GUI is planned but not yet shipped — for now the desktop app remains Windows-only.

CI & releases

GitHub Actions reproduces the build on every push (.github/workflows/build.yml). Releases are managed by release-please under Semantic Versioning: conventional-commit messages on main keep an open release PR up to date; merging it tags the version and creates the GitHub Release. The winget manifest for each version is generated automatically and the winget folder is submitted to the community repository. See the README for the full procedure.

Clone this wiki locally