Skip to content

ARTHUR-BBU/diskdisk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

2 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

DiskDisk ๐Ÿงน

A safe and efficient disk cleanup tool for Windows

Rust License Platform

English | ็ฎ€ไฝ“ไธญๆ–‡


๐Ÿ“– Project Overview

DiskDisk is a modern disk cleanup tool written in Rust that supports 38 cache types, covering popular domestic and international applications. It helps users free up disk space and improve system performance through intelligent scanning and safe cleanup.

Key Features

  • ๐Ÿ” Smart Scanning - Automatically identify system and application caches
  • ๐Ÿ›ก๏ธ Safe & Reliable - Whitelist mechanism, only clean known safe caches
  • ๐Ÿš€ High Performance - Rust-powered, extremely fast scanning and cleanup
  • ๐Ÿ’ป Dual Interface - Both CLI command-line and GUI graphical interface
  • ๐Ÿ“Š Detailed Statistics - Display cache size, file count, and more

Supported Cache Types (38 types)

Windows System (8 types)

  • Windows temp files, prefetch, logs, update cache
  • Defender scan history, explorer cache, font cache, IE cache

Browsers (6 types)

  • Chrome, Edge, Firefox
  • Doubao, QQ Browser, 360 Browser

Development Tools (5 types)

  • NPM, Cargo, Pip, Docker, Node GYP

Office Software (4 types)

  • VS Code, JetBrains IDE, Microsoft Office, WPS Office

Social & Communication (3 types)

  • WeChat, QQ, DingTalk

Video Editing (1 type)

  • JianyingPro

Note-taking & Docs (1 type)

  • Notion

Video Conferencing (1 type)

  • Zoom

Security Software (2 types)

  • 360 Security, 360 Browser (separate from security software)

SDK & Tools (1 type)

  • SecretSDK

Trading Platforms (1 type)

  • FTNN Exchange

OCR Tools (1 type)

  • 2345OCR

Python Environment (1 type)

  • Python Environment

Others (4 types)

  • Intel Graphics cache, Baidu Netdisk, Recycle Bin

๐Ÿ“Š Project Progress

Completed Features โœ…

Core Library (diskdisk-core)

  • โœ… 38 cache type definitions and configurations
  • โœ… Automatic environment variable expansion (%APPDATA%, %LOCALAPPDATA%, etc.)
  • โœ… Cache scanner
  • โœ… Cache cleaner
  • โœ… Error handling and logging
  • โœ… Unit tests (7 test cases)

CLI Interface

  • โœ… Command-line argument parsing
  • โœ… Scan mode (--scan)
  • โœ… Clean mode (--clean)
  • โœ… Verbose output (--verbose)
  • โœ… User confirmation mechanism
  • โœ… Cleanup statistics report

GUI Interface (Tauri)

  • โœ… Project structure setup
  • โœ… Tauri 2.0 integration
  • โœ… Modern UI (Tailwind CSS)
  • โœ… Scan page (real-time progress)
  • โœ… Clean page (selective cleanup)
  • โœ… Settings page (configuration options)
  • โœ… Frontend-backend communication (Tauri commands)

Documentation

  • โœ… README.md (project homepage)
  • โœ… QUICKSTART.md (quick start guide)
  • โœ… USAGE.md (complete guide)
  • โœ… System scan report
  • โœ… Domestic app scan report
  • โœ… GUI development summary

Real Performance ๐ŸŽ‰

Scan results: 93,293 files, 9.07 GB (pre-expansion: 30 cache types)
Post-expansion scan: 46,536 files, 5.44 GB (38 cache types)
Actual cleanup: 25,248 files, 2.55 GB (pre-expansion)
New caches cleanable: ~4.86 GB

Pending Features ๐Ÿ“

High Priority

  • Add application icons
  • Improve error handling
  • Cache detail viewer
  • Cleanup history

Medium Priority

  • Scheduled cleanup
  • Custom cache paths
  • Portable version

Low Priority

  • Auto-update
  • Cloud sync for settings
  • Plugin system

๐Ÿš€ Quick Start

Prerequisites

Installation

Option 1: Build from Source

# Clone repository
git clone https://github.com/ARTHUR-BBU/diskdisk.git
cd diskdisk

# Build project
cargo build --release

# CLI executable
.\target\release\diskdisk.exe

Option 2: Download Pre-built Binary (Coming Soon)

Pre-built binaries will be available in Releases page.

Basic Usage

CLI - Scan Mode

diskdisk.exe --scan

Output:

Scanning for cache files...
Found the following caches:
  โ€ข Notion - 1.88 GB (16070 files)
  โ€ข Zoom - 571.58 MB (970 files)
  โ€ข 360 Security - 572.45 MB (5235 files)
  ...

Total: 46,536 files, 5.44 GB

CLI - Clean Mode

diskdisk.exe --clean

Interactive confirmation:

โš ๏ธ  Cleanup mode will delete files!
About to delete: 46,536 files, 5.44 GB

Continue? [y/N]: y

โœจ Cleanup complete!
  Files deleted: 46,536
  Space freed: 5.44 GB

GUI - Desktop Application

cd desktop-gui
cargo tauri dev

๐Ÿ—๏ธ Architecture

Workspace Structure

diskdisk/
โ”œโ”€โ”€ crates/
โ”‚   โ”œโ”€โ”€ core/           # Core library (platform-agnostic)
โ”‚   โ”‚   โ”œโ”€โ”€ scanner.rs       # Cache scanning logic
โ”‚   โ”‚   โ”œโ”€โ”€ cleaner.rs       # Cache cleanup logic
โ”‚   โ”‚   โ””โ”€โ”€ cache_types.rs   # Cache type definitions
โ”‚   โ””โ”€โ”€ cli/            # Command-line interface
โ”œโ”€โ”€ desktop-gui/        # Tauri GUI application
โ”œโ”€โ”€ docs/               # Project documentation
โ”œโ”€โ”€ Cargo.toml          # Workspace configuration
โ””โ”€โ”€ README.md           # This file

Design Principles

  1. Core Library Agnostic - diskdisk-core doesn't depend on any UI framework
  2. Safety First - All deletions require explicit confirmation
  3. Extensibility - Easy to add new cache types via CacheType and CacheLocation
  4. Cross-platform Potential - Currently focused on Windows, but architecture considers future cross-platform support

๐Ÿ› ๏ธ Development Guide

Build Project

# Build all components
cargo build

# Build only core library
cargo build -p diskdisk-core

# Build only CLI
cargo build -p diskdisk

# Build GUI (requires Tauri dependencies)
cargo build -p diskdisk-gui

Run Tests

# Run all tests
cargo test

# Run tests for core library only
cargo test -p diskdisk-core

# Run with output
cargo test -- --nocapture

Code Quality

# Format code
cargo fmt

# Check code style
cargo fmt --check

# Run linter
cargo clippy -- -D warnings

๐Ÿ“š Documentation


๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Adding New Cache Types

  1. Add new variant to CacheType enum in crates/core/src/cache_types.rs
  2. Add cache location configuration in crates/core/src/scanner.rs
  3. Update parse_cache_type() in desktop-gui/src/lib.rs (for GUI)
  4. Test with cargo run --bin diskdisk -- --scan

Example:

// cache_types.rs
pub enum CacheType {
    // ... existing types
    MyAppCache,
}

// scanner.rs
CacheLocation {
    cache_type: CacheType::MyAppCache,
    paths: vec![r"%LOCALAPPDATA%\MyApp\Cache".to_string()],
    description: "My Application Cache",
    dangerous: false,
}

๐Ÿ“„ License

Dual-licensed under:

You may choose either license for your use.


๐Ÿ™ Acknowledgments

  • Rust - The systems programming language
  • Tauri - Cross-platform desktop framework
  • walkdir - Directory traversal
  • All contributors and users of DiskDisk

๐Ÿ“ฎ Contact & Support


Made with โค๏ธ and Rust by ARTHUR-BBU

About

A safe and efficient Windows disk cleanup tool written in Rust. Supports 30+ cache types including browsers, development tools, and Chinese applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors