From 7be3110bfb14020bd09ca48ba3044189241317a5 Mon Sep 17 00:00:00 2001 From: "heesk0223@gmail.com" Date: Sat, 30 May 2026 04:16:24 +0900 Subject: [PATCH 1/3] Initialize DustFril workspace --- Cargo.lock | 14 ++++ Cargo.toml | 7 ++ ReadMe.ko.md | 90 ++++++++++++++++++++++++ ReadMe.md | 90 ++++++++++++++++++++++++ apps/dustfril-cli/.gitignore | 1 + apps/dustfril-cli/Cargo.toml | 7 ++ apps/dustfril-cli/src/main.rs | 5 ++ crates/dustfril-core/.gitignore | 1 + crates/dustfril-core/Cargo.toml | 6 ++ crates/dustfril-core/src/analyzer/mod.rs | 0 crates/dustfril-core/src/cleaner/mod.rs | 0 crates/dustfril-core/src/detector/mod.rs | 0 crates/dustfril-core/src/lib.rs | 8 +++ crates/dustfril-core/src/models/mod.rs | 0 14 files changed, 229 insertions(+) create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 ReadMe.ko.md create mode 100644 ReadMe.md create mode 100644 apps/dustfril-cli/.gitignore create mode 100644 apps/dustfril-cli/Cargo.toml create mode 100644 apps/dustfril-cli/src/main.rs create mode 100644 crates/dustfril-core/.gitignore create mode 100644 crates/dustfril-core/Cargo.toml create mode 100644 crates/dustfril-core/src/analyzer/mod.rs create mode 100644 crates/dustfril-core/src/cleaner/mod.rs create mode 100644 crates/dustfril-core/src/detector/mod.rs create mode 100644 crates/dustfril-core/src/lib.rs create mode 100644 crates/dustfril-core/src/models/mod.rs diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..0c58494 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,14 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "dustfril-cli" +version = "0.1.0" +dependencies = [ + "dustfril-core", +] + +[[package]] +name = "dustfril-core" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..5b26ac4 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,7 @@ +[workspace] +resolver = "2" + +members = [ + "crates/dustfril-core", + "apps/dustfril-cli" +] diff --git a/ReadMe.ko.md b/ReadMe.ko.md new file mode 100644 index 0000000..07d093c --- /dev/null +++ b/ReadMe.ko.md @@ -0,0 +1,90 @@ +# DustFril + +Rust 개발자를 위한 산출물(Artifact) 분석 및 정리 도구입니다. + +DustFril은 Cargo와 Rust 도구들이 생성하는 빌드 산출물과 캐시를 탐지하고, 용량을 분석하며, 안전하게 정리할 수 있도록 돕는 것을 목표로 합니다. + +Rust 프로젝트를 오래 관리하다 보면 `target/`, Cargo 캐시 등의 디렉터리가 수 GB에서 수십 GB까지 증가할 수 있습니다. + +DustFril은 이러한 생성 파일들을 쉽고 안전하게 관리할 수 있는 CLI 도구를 지향합니다. + +## 주요 기능 + +### 현재 목표 + +- Rust 산출물 탐지 +- 디스크 사용량 분석 +- Cargo 캐시 분석 +- 안전한 정리 기능 + +### 지원 예정 + +- `target/` +- `~/.cargo/registry` +- `~/.cargo/git` + +## 사용 예시 + +프로젝트 스캔: + +```bash +dustfril scan +``` + +용량 분석: + +```bash +dustfril analyze +``` + +삭제 예정 파일 확인: + +```bash +dustfril clean --dry-run +``` + +실제 정리: + +```bash +dustfril clean +``` + +## 로드맵 + +### Phase 1 + +- Cargo 프로젝트 탐지 +- Rust 산출물 탐지 +- 기본 CLI 구현 + +### Phase 2 + +- 디스크 사용량 분석 +- Dry Run 지원 +- 안전 삭제 기능 + +### Phase 3 + +- 인터랙티브 터미널 UI +- 설정 파일 지원 +- 고급 필터링 + +### Phase 4 + +- 데스크톱 애플리케이션 +- 다중 언어 생태계 지원 + +## 철학 + +DustFril은 다음 원칙을 중요하게 생각합니다. + +- 안전성 우선 +- 명시적 사용자 동작 +- 투명한 동작 +- 개발자 친화적 경험 + +DustFril은 사용자의 확인 없이 파일을 삭제하지 않습니다. + +## 라이선스 + +MIT License diff --git a/ReadMe.md b/ReadMe.md new file mode 100644 index 0000000..6e707d1 --- /dev/null +++ b/ReadMe.md @@ -0,0 +1,90 @@ +# DustFril + +A Rust development artifact analyzer and cleaner. + +🚧 Early development stage + +DustFril helps Rust developers discover, analyze, and safely manage generated files created by Cargo and Rust tooling. + +Over time, Rust projects accumulate build artifacts and caches that consume significant disk space. DustFril aims to provide a simple and transparent way to inspect and clean those artifacts. + +## Features + +### Current Focus + +- Detect Rust build artifacts +- Analyze disk usage +- Inspect Cargo caches +- Safe cleanup workflow + +### Planned Support + +- `target/` +- `~/.cargo/registry` +- `~/.cargo/git` + +## Example + +Scan Rust artifacts: + +```bash +dustfril scan +``` + +Analyze disk usage: + +```bash +dustfril analyze +``` + +Preview cleanup: + +```bash +dustfril clean --dry-run +``` + +Clean artifacts: + +```bash +dustfril clean +``` + +## Project Goals + +### Phase 1 + +- Cargo project scanning +- Rust artifact detection +- Basic CLI + +### Phase 2 + +- Disk usage analysis +- Dry-run support +- Safe cleanup operations + +### Phase 3 + +- Interactive terminal interface +- Configuration support +- Advanced filtering + +### Phase 4 + +- Desktop application +- Multi-language ecosystem support + +## Philosophy + +DustFril follows a few simple principles: + +- Safety first +- Explicit user actions +- Transparent operations +- Developer-friendly experience + +DustFril will never remove files without user confirmation. + +## License + +MIT License diff --git a/apps/dustfril-cli/.gitignore b/apps/dustfril-cli/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/apps/dustfril-cli/.gitignore @@ -0,0 +1 @@ +/target diff --git a/apps/dustfril-cli/Cargo.toml b/apps/dustfril-cli/Cargo.toml new file mode 100644 index 0000000..dcf37cf --- /dev/null +++ b/apps/dustfril-cli/Cargo.toml @@ -0,0 +1,7 @@ +[package] +name = "dustfril-cli" +version = "0.1.0" +edition = "2024" + +[dependencies] +dustfril-core = { path = "../../crates/dustfril-core" } diff --git a/apps/dustfril-cli/src/main.rs b/apps/dustfril-cli/src/main.rs new file mode 100644 index 0000000..d9e4543 --- /dev/null +++ b/apps/dustfril-cli/src/main.rs @@ -0,0 +1,5 @@ +use dustfril_core::scan; + +fn main() { + scan(); +} diff --git a/crates/dustfril-core/.gitignore b/crates/dustfril-core/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/crates/dustfril-core/.gitignore @@ -0,0 +1 @@ +/target diff --git a/crates/dustfril-core/Cargo.toml b/crates/dustfril-core/Cargo.toml new file mode 100644 index 0000000..dd15295 --- /dev/null +++ b/crates/dustfril-core/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "dustfril-core" +version = "0.1.0" +edition = "2024" + +[dependencies] diff --git a/crates/dustfril-core/src/analyzer/mod.rs b/crates/dustfril-core/src/analyzer/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/crates/dustfril-core/src/cleaner/mod.rs b/crates/dustfril-core/src/cleaner/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/crates/dustfril-core/src/detector/mod.rs b/crates/dustfril-core/src/detector/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/crates/dustfril-core/src/lib.rs b/crates/dustfril-core/src/lib.rs new file mode 100644 index 0000000..919d0c6 --- /dev/null +++ b/crates/dustfril-core/src/lib.rs @@ -0,0 +1,8 @@ +pub mod analyzer; +pub mod cleaner; +pub mod detector; +pub mod models; + +pub fn scan() { + println!("DustFril scan"); +} diff --git a/crates/dustfril-core/src/models/mod.rs b/crates/dustfril-core/src/models/mod.rs new file mode 100644 index 0000000..e69de29 From 81e15dba1194859b17fb07ce3fedd54b5b5cc37f Mon Sep 17 00:00:00 2001 From: "heesk0223@gmail.com" Date: Sat, 30 May 2026 04:36:58 +0900 Subject: [PATCH 2/3] Initialize DustFril workspace --- .github/ISSUE_TEMPLATE/BUG_REPORT.md | 37 +++++++ .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md | 28 +++++ .github/PULL_REQUEST_TEMPLATE.md | 33 ++++++ .github/workflows/rust.yml | 25 +++++ CONTRIBUTING.md | 123 ++++++++++++++++++++++ 5 files changed, 246 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/BUG_REPORT.md create mode 100644 .github/ISSUE_TEMPLATE/FEATURE_REQUEST.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/rust.yml create mode 100644 CONTRIBUTING.md diff --git a/.github/ISSUE_TEMPLATE/BUG_REPORT.md b/.github/ISSUE_TEMPLATE/BUG_REPORT.md new file mode 100644 index 0000000..a7b3372 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/BUG_REPORT.md @@ -0,0 +1,37 @@ +--- +name: Bug report +about: Report a reproducible problem in DustFril +title: '[Bug] ' +labels: bug +--- + +--- + +## Bug description + +Clearly and concisely describe the bug. + +## Steps to reproduce + +1. Run `...` +2. Execute `...` +3. Observe `...` + +## Expected behavior + +Describe what you expected to happen. + +## Actual behavior + +Describe what actually happened. + +## Environment + +- OS: +- Rust version: +- Cargo version: +- DustFril version/commit: + +## Logs or screenshots + +Paste relevant logs, error output, or screenshots. diff --git a/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md new file mode 100644 index 0000000..82dae1e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md @@ -0,0 +1,28 @@ +--- +name: Feature request +about: Suggest an idea or enhancement for DustFril +title: '[Feature] ' +labels: enhancement +--- + +--- + +## Summary + +Briefly describe the feature you want. + +## Problem to solve + +What problem does this feature solve? + +## Proposed solution + +Describe your preferred solution in detail. + +## Alternatives considered + +List any alternative approaches you considered. + +## Additional context + +Add examples, screenshots, links, or related issues if applicable. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..045cf44 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,33 @@ +## What + + + +## Why + + + +Closes # + +## Checklist + +### Required + +- [ ] cargo check passes +- [ ] cargo fmt --check passes +- [ ] cargo clippy --workspace --all-targets -- -D warnings passes +- [ ] cargo test passes + +### Functional Validation + +- [ ] I verified the behavior locally +- [ ] I added or updated tests when necessary + +### Documentation + +- [ ] README or docs were updated if needed +- [ ] New configuration or behavior is documented + +### Safety + +- [ ] Cleanup behavior was reviewed for safety +- [ ] No destructive behavior was introduced without confirmation diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..0812ebc --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,25 @@ +name: Rust CI + +on: + pull_request: + push: + branches: + - main + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + + - name: Format + run: cargo fmt --all -- --check + + - name: Clippy + run: cargo clippy --workspace --all-targets -- -D warnings + + - name: Tests + run: cargo test --workspace diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..46d3fa4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,123 @@ +# Contributing to DustFril + +Thank you for contributing to **DustFril**. + +DustFril is a Rust-based artifact analyzer and cleaner focused on helping developers discover, analyze, and safely manage generated files created by Rust tooling. + +This guide describes the expected workflow and quality standards for contributions. + +## Getting Started + +1. Install the stable Rust toolchain. +2. Clone the repository. +3. Open the project in your preferred editor. +4. Run the required checks before opening a pull request. + +```sh +cargo check --workspace +cargo fmt --all -- --check +cargo clippy --workspace --all-targets -- -D warnings +cargo test --workspace +``` + +Optional local build: + +```sh +cargo build --workspace +``` + +## Project Structure + +DustFril is organized as a Rust workspace. + +```text +dustfril/ +├── crates/ +│ └── dustfril-core +│ +└── apps/ + └── dustfril-cli +``` + +### dustfril-core + +Contains the core business logic: + +- Artifact detection +- Disk usage analysis +- Cleanup operations +- Shared domain models + +### dustfril-cli + +Contains the command-line interface. + +The CLI should remain thin and delegate business logic to `dustfril-core`. + +## Code Style + +- Run `cargo fmt --all` before committing. +- Treat Clippy warnings as errors. + +```sh +cargo clippy --workspace --all-targets -- -D warnings +``` + +- Prefer small, focused changes. +- Avoid unrelated refactoring. +- Keep public APIs stable when possible. +- Add or update tests when behavior changes. + +## Pull Requests + +- Open pull requests against the `main` branch. +- Keep each PR focused on a single logical change. +- Link related issues when applicable. + +Example: + +```text +Closes #12 +``` + +Before opening a PR, verify: + +```sh +cargo check --workspace +cargo fmt --all -- --check +cargo clippy --workspace --all-targets -- -D warnings +cargo test --workspace +``` + +## Philosophy + +DustFril prioritizes: + +- Safety +- Transparency +- Predictability + +Cleanup operations should never remove files without explicit user intent. + +When introducing cleanup behavior, always consider the risk of accidental data loss. + +## Dependencies + +When introducing a new dependency: + +- Prefer actively maintained crates. +- Keep dependencies minimal. +- Explain why the dependency is required in the pull request. + +## Design Principles + +- Core logic belongs in `dustfril-core` +- CLI remains a thin wrapper +- Safety is more important than aggressive cleanup +- Artifact detection should be deterministic + +## Questions + +If you are unsure about an implementation approach, open an issue before starting large changes. + +Contributions of all sizes are welcome. From 63b1982b047c4cc75216b75059cf8e4728cee064 Mon Sep 17 00:00:00 2001 From: "heesk0223@gmail.com" Date: Sat, 30 May 2026 05:08:39 +0900 Subject: [PATCH 3/3] Fix: Blank documents --- crates/dustfril-core/src/analyzer/mod.rs | 1 + crates/dustfril-core/src/cleaner/mod.rs | 1 + crates/dustfril-core/src/detector/mod.rs | 1 + crates/dustfril-core/src/models/mod.rs | 1 + 4 files changed, 4 insertions(+) diff --git a/crates/dustfril-core/src/analyzer/mod.rs b/crates/dustfril-core/src/analyzer/mod.rs index e69de29..c048a99 100644 --- a/crates/dustfril-core/src/analyzer/mod.rs +++ b/crates/dustfril-core/src/analyzer/mod.rs @@ -0,0 +1 @@ +//! Analyzer module. diff --git a/crates/dustfril-core/src/cleaner/mod.rs b/crates/dustfril-core/src/cleaner/mod.rs index e69de29..4606860 100644 --- a/crates/dustfril-core/src/cleaner/mod.rs +++ b/crates/dustfril-core/src/cleaner/mod.rs @@ -0,0 +1 @@ +//! Cleaner module. diff --git a/crates/dustfril-core/src/detector/mod.rs b/crates/dustfril-core/src/detector/mod.rs index e69de29..4817161 100644 --- a/crates/dustfril-core/src/detector/mod.rs +++ b/crates/dustfril-core/src/detector/mod.rs @@ -0,0 +1 @@ +//! Detector module. diff --git a/crates/dustfril-core/src/models/mod.rs b/crates/dustfril-core/src/models/mod.rs index e69de29..7a3a919 100644 --- a/crates/dustfril-core/src/models/mod.rs +++ b/crates/dustfril-core/src/models/mod.rs @@ -0,0 +1 @@ +//! Shared models.