Zinit Client
A Rust client library for the Zinit service manager.
Universal Compatibility: Automatically works with both old (v0.2.14) and new (v0.2.25+) Zinit servers through automatic protocol detection.
Features
- Zero Configuration: Automatically detects server version and protocol
- Complete API: All Zinit operations (list, start, stop, create, delete, etc.)
- Async/Await: Built on Tokio for high performance
- Type Safe: Strongly typed service states and responses
- Error Handling: Comprehensive error types with helpful messages
- Backward Compatible: Works with legacy Zinit installations
Installation
Add this to your Cargo.toml:
[]
= "0.4.0"
Quick Start
use ZinitClient;
async
API Overview
Service Management
// List all services
let services = client.list.await?;
// Service lifecycle
client.start.await?;
client.stop.await?;
client.restart.await?;
// Get detailed status
let status = client.status.await?;
// Create/delete services (if supported by server)
client.create_service.await?;
client.delete_service.await?;
Examples
Run the demo to see the universal interface in action:
Documentation
For detailed API documentation, visit docs.rs/zinit-client.
License
This project is licensed under the MIT License - see the LICENSE file for details.