-
Notifications
You must be signed in to change notification settings - Fork 0
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.
Needs the Rust stable toolchain.
cd rust
cargo build --release # -> rust/target/release/cluttercutter.exeThe 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:\UsersKeep the tree cargo fmt-clean and cargo clippy --release-clean.
cd rust
cargo test # unit tests for the logic modulesThe 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-onlyThe 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.
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.