toolcraft-utils
Common utilities and helper functions for the toolcraft ecosystem.
Features
- 🚀 Common utility functions for everyday use
- 🔧 Helper functions for the toolcraft ecosystem
- 🎯 Zero dependencies for core functionality
- âš¡ Performance-focused implementations
- 🧩 Modular design - use only what you need
Installation
Add this to your Cargo.toml:
[]
= "*"
Check the crates.io page for the latest version.
Quick Start
use *;
Planned Features
This crate is currently in early development. Planned utilities include:
String Utilities
- String manipulation helpers
- Case conversion utilities
- Text processing functions
File System Utilities
- Path manipulation helpers
- File reading/writing utilities
- Directory traversal helpers
Time Utilities
- Duration formatting
- Time calculation helpers
- Timestamp utilities
Data Structure Utilities
- Collection helpers
- Data transformation utilities
- Common algorithms
Error Handling Utilities
- Result combinators
- Error conversion helpers
- Retry mechanisms
Encoding Utilities
- Base64 encoding/decoding
- Hex encoding/decoding
- Hash utilities
Network Utilities
- URL parsing helpers
- IP address utilities
- Port validation
Validation Utilities
- Input validation helpers
- Format validators
- Range checks
Contributing
This crate is in early development and we welcome contributions! If you have ideas for useful utilities that would benefit the toolcraft ecosystem, please feel free to:
- Open an issue to discuss the utility
- Submit a pull request with your implementation
- Add comprehensive tests and documentation
Guidelines for New Utilities
When adding new utilities, please ensure:
- Zero or minimal dependencies: Keep the crate lightweight
- Comprehensive documentation: Include examples for each function
- Thorough testing: Add unit tests for all edge cases
- Performance considerations: Optimize for common use cases
- Ergonomic API: Make functions easy to use and discover
Example Structure (Future)
// String utilities
use ;
let snake = to_snake_case; // "hello_world"
let camel = to_camel_case; // "helloWorld"
// File utilities
use ;
ensure_dir?;
let config: MyConfig = read_json?;
// Time utilities
use ;
let duration = parse_duration?;
let formatted = format_duration; // "1 hour 30 minutes"
// Validation utilities
use ;
if is_valid_email
Design Philosophy
- Simplicity: Each utility should do one thing well
- Composability: Utilities should work well together
- Performance: Optimize for the common case
- Safety: Prefer safe APIs, use unsafe only when necessary
- Clarity: Clear naming and obvious behavior
License
This project is licensed under the MIT License - see the LICENSE file for details.