Rust Implementation of the ZKTeco Attendance device communication protocol.
- Type-safe protocol implementation
- Async/await API using Tokio
- Comprehensive error handling
- TCP transport
- Full protocol support (50+ commands)
- Zero unsafe code
[dependencies]
zkrust = "0.1"use zkrust::Device;
#[tokio::main]
async fn main() -> zkrust::Result<()> {
// Connect to device
let mut device = Device::new("192.168.1.201", 4370);
device.connect().await?;
// Get device info
let info = device.get_device_info().await?;
println!("Device: {}", info);
// Disconnect
device.disconnect().await?;
Ok(())
}# Set your device IP
export DEVICE_IP="192.168.1.201"
# Run tests
./test.shMIT