Overview
Dev Utils is a comprehensive Rust workspace providing a collection of utility crates designed to streamline common development tasks and enhance productivity. Whether you're building CLIs, scripts, or larger applications, Dev Utils offers a robust toolkit for logging, file manipulation, data formatting, and more.
This project aims to provide well-tested, ergonomic, and practical tools, born out of real-world development needs and a desire to explore Rust's capabilities.
Key Features
- Enhanced Logging (
dlog
): A flexible logging system with multiple levels, colored output, and customizable formatting, distinct from but inspired by thelog
crate. - Powerful File Operations (
file
): Simplified CRUD operations, directory listing, recursive copying, and file finding capabilities. - Terminal Text Styling (
format
): Easy-to-use text coloring (RGB) and styling (bold, italic, etc.) for rich terminal output. - Arbitrary Base Conversion (
base_change
): Convert numbers between various bases (2-62), supporting integers and fractional parts. - Custom DateTime Utilities (
datetime
): Structs and methods for date/time representation, timestamp conversion, and parsing. - Project Info Macro (
app_dt!
): Quickly display your crate'sCargo.toml
information (name, version, custom fields) in your application, great for CLIs. - Procedural Macros (
dev_macros
): (Work in Progress) A dedicated crate for custom procedural macros to reduce boilerplate and add powerful compile-time functionalities. - Zero Boilerplate (Goal): Aims to provide ready-to-use utilities that require minimal setup.
Installation
Add dev_utils
to your Cargo.toml
dependencies:
[]
= "0.1.1" # Replace with the latest version
Quick Start
Here's a glimpse of what you can do with dev_utils
:
use app_dt;
Examples
Detailed examples showcasing various features of dev_utils
can be found in the dev_utils/examples/
directory. Each example is designed to be run directly and demonstrates specific functionalities.
- Main Tester: A general testbed for various features.
- Base Change: Demonstrates number base conversions.
- Formatting: Showcases text styling and coloring.
- Dlog: Illustrates the use of the custom logging module.
- (And others as you add them)
To run an example (e.g., main_tester
from within the yrrrrrrf-dev_utils
root directory):
Contributing
We welcome contributions to the Dev Utils Project! If you'd like to contribute, please:
- Fork the repository.
- Create a new branch for your feature or bug fix (
git checkout -b feature/your-feature-name
). - Make your changes and commit them with clear, descriptive messages.
- Push your changes to your fork (
git push origin feature/your-feature-name
). - Create a pull request to the main repository.
Please ensure your code adheres to the existing style, includes appropriate tests, and is well-documented.
Future Goals / Roadmap (Optional)
- Finalize and integrate
dev_macros
for common boilerplate reduction (e.g., smart constructors). - Expand
file
utilities with more advanced features (e.g., watching file changes). - Introduce features for light-weight benchmarking.
- Explore adding utilities for simple network requests or configuration management.
License
This project is licensed under the MIT License - see the LICENSE file for details.