This is a major release introducing universal compatibility with all Zinit server versions through automatic protocol detection.
-
Universal Interface: Revolutionary automatic protocol detection system
- Seamlessly works with both old (v0.2.14) and new (v0.2.25+) Zinit servers
- Zero configuration required - automatically detects server capabilities
- Consistent API across all server versions
- Graceful degradation for unsupported features
-
Automatic Protocol Detection:
- JSON-RPC protocol support for new servers (v0.2.25+)
- Raw command protocol support for legacy servers (v0.2.14)
- Smart capability detection with feature awareness
- Helpful error messages for unsupported operations
-
Complete Service Management:
create_service(name, config)- Create new services with JSON configurationget_service(name)- Retrieve service configuration and detailed status informationdelete_service(name)- Safely delete services (stops them first if running)- Full service lifecycle management (start, stop, restart, monitor, forget, kill)
-
Production-Ready Features:
- Comprehensive error handling with custom error types
- Automatic retry mechanisms with exponential backoff
- Connection pooling and timeout management
- Structured logging with tracing support
- Type-safe operations with Rust's type system
-
Enhanced Testing:
- Universal mock server supporting both protocols
- 18 comprehensive integration tests (100% passing)
- Real-world test scenarios for both server versions
- Professional test coverage with no placeholders
-
Professional Documentation:
- Complete README with universal interface examples
- Universal interface technical documentation
- Working examples demonstrating protocol detection
- Comprehensive API documentation
- Protocol Handling: Complete rewrite of protocol layer for universal compatibility
- Performance: Optimized connection management and request handling
- Error Handling: Enhanced error messages with server-specific guidance
- Documentation: Updated all examples and documentation for universal interface
- Code Quality: Zero clippy warnings, professional code structure
- Backward Compatibility: 100% compatible with existing client code
- Forward Compatibility: Automatically supports new server features when available
- Protocol Detection: Uses JSON-RPC probe with fallback to raw commands
- Feature Awareness: Server capability detection prevents unsupported operations
- Connection Management: Robust retry logic with exponential backoff
- Type Safety: Comprehensive use of Rust's type system for reliability
No migration required! Existing code continues to work unchanged. The universal interface is completely backward compatible.
// This code works with both old and new servers automatically
let client = ZinitClient::new("/var/run/zinit.sock");
let services = client.list().await?; // Works with any server version- Service CRUD Operations: Three new methods for comprehensive service management:
create_service(name, config)- Create new services with JSON configurationget_service(name)- Retrieve service configuration and detailed status informationdelete_service(name)- Safely delete services (stops them first if running)
- Enhanced Mock Server: Added support for
create,get, anddeletecommands in test mock server - Comprehensive Unit Tests: 8 new integration tests covering all CRUD operations and edge cases
- Interactive Service Management: Enhanced
service_management.rsexample with full CRUD operations menu - Improved Documentation: Updated README.md with service CRUD examples and usage patterns
- Consolidated Examples: Merged
service_crud_operations.rsintoservice_management.rsfor better organization - Enhanced Error Handling: Better error messages and handling for service CRUD operations
- Improved Mock Server: More robust command parsing to handle JSON configurations properly
- Renamed the client to zinit-client
- Changed the package name to zinit-client
- Initial release with basic Zinit client functionality
- Complete API coverage for all Zinit operations
- Robust error handling with custom error types
- Automatic reconnection on socket errors
- Retry mechanisms for transient failures
- Async/await support using Tokio
- Strongly typed service states and responses
- Efficient log streaming