| Crates.io | rs_clean |
| lib.rs | rs_clean |
| version | 0.3.0 |
| created_at | 2024-08-21 07:58:30.233487+00 |
| updated_at | 2025-08-26 07:48:06.345804+00 |
| description | Rust project that provides a command-line tool designed for cleaning up build artifacts within projects. |
| homepage | |
| repository | https://github.com/pwh-pwh/rs_clean |
| max_upload_size | |
| id | 1346244 |
| size | 93,758 |
β‘ Easily remove compiled build artifacts from Rust, Go, Gradle, and Maven projects with a single command.
π Looking for Chinese docs? View δΈζθ―΄ζ π¨π³
graph TD
A[rs_clean CLI] --> B{main.rs};
B --> C(Command Line Argument Parsing: clap);
C --> D(Initialize Cleaning Commands: constant.rs, utils.rs);
D -- Supported Commands --> E[lib.rs - do_clean_all];
E -- Recursive Scan --> F(walkdir);
F -- Project Identification & Task Generation --> G{cmd.rs - Cmd};
G -- Asynchronous Execution & Concurrency Control --> H(tokio, Semaphore, futures::join_all);
H -- Actual Cleaning Operation --> I(Cmd::run_clean);
I -- External Command Execution --> J(tokio::process::Command);
I -- node_modules Deletion --> K(tokio::fs::remove_dir_all);
E -- Result Statistics & Formatting --> L(get_dir_size_async, format_size);
L -- Progress Display & Final Report --> M(indicatif, colored);
$ rs_clean folder/
This command recursively removes build directories in the specified folder and its subdirectories.
You can also exclude specific directory names from cleaning:
$ rs_clean folder/ --exclude-dir node_modules --exclude-dir build
Or exclude certain project types:
$ rs_clean folder/ --exclude-type go --exclude-type maven
cargo install rs_clean
π Download from GitHub Releases Grab the latest binary for your operating system.
target/build/target/node_modules/ (by removing node_modules directory directly)__pycache__/, venv/, .venv/, build/, dist/, .eggs/, etc. (by removing these directories directly)$ tree my_projects/
my_projects/
βββ rust_app/
β βββ target/
βββ go_service/
β βββ bin/
βββ gradle_app/
β βββ build/
βββ maven_module/
βββ target/
After running:
$ rs_clean my_projects/
The build artifacts will be cleaned:
$ tree my_projects/
my_projects/
βββ rust_app/
βββ go_service/
βββ gradle_app/
βββ maven_module/
--exclude-dir)We welcome contributions and feedback!
MIT License Β© 2025 [coderpwh]