| Crates.io | workspacer-cleanup |
| lib.rs | workspacer-cleanup |
| version | 0.1.2 |
| created_at | 2025-04-01 07:38:57.670724+00 |
| updated_at | 2025-07-13 01:01:25.11363+00 |
| description | A Rust crate for asynchronous cleanup of unnecessary files and directories in a workspace, maintaining development efficiency. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1614518 |
| size | 157,383 |
workspacer-cleanup is a Rust crate designed to streamline development workflows by efficiently purging unnecessary files and directories within a workspace. Employing asynchronous operations, this crate helps maintain a tidy project environment, crucial for optimal performance during compilation cycles and versioning tasks.
target/ and Cargo.lock to prevent clutter.WorkspaceError enumerations for both file and directory removal operations.CleanupWorkspace trait.Incorporate workspacer-cleanup into your project by implementing the CleanupWorkspace trait within your workspace structure. Utilize the cleanup_workspace method to perform the cleanup operation asynchronously.
#[async_trait]
pub trait CleanupWorkspace {
async fn cleanup_workspace(&self) -> Result<(), WorkspaceError>;
}
// Example implementation
impl<P, H: CrateHandleInterface<P>> CleanupWorkspace for Workspace<P, H> where for<'async_trait> P: From<PathBuf> + AsRef<Path> + Send + Sync + 'async_trait {
async fn cleanup_workspace(&self) -> Result<(), WorkspaceError> {
// Cleanup logic here
}
}
Add the following to your Cargo.toml:
[dependencies]
workspacer-cleanup = "0.1.0"
This crate requires Rust edition 2024 and is intended for systems where asynchronous file operations are optimal.
Contributions are welcome! Please adhere to the standard Rust coding practices, and ensure all changes are covered with appropriate tests.