·
1 commit
to development
since this release
Major Release: Universal Interface
This is a major release introducing universal compatibility with all Zinit server versions through automatic protocol detection.
Added
-
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
Changed
- 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
Technical Details
- 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
Migration Guide
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