#fingerprint #attendance #zkteco

zkrust-types

Unofficial library of zkteco fingerprint attendance machines

1 unstable release

Uses new Rust 2024

0.1.0 Dec 7, 2025

#5 in #attendance


Used in zkrust

MIT license

4KB

zkrust

Rust Implementation of the ZKTeco Attendance device communication protocol.

Features

  • Type-safe protocol implementation
  • Async/await API using Tokio
  • Comprehensive error handling
  • TCP transport
  • Full protocol support (50+ commands)
  • Zero unsafe code

Installation

[dependencies]
zkrust = "0.1"

Quick Start

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(())
}

Testing with Real Device

# Set your device IP
export DEVICE_IP="192.168.1.201"

# Run tests
./test.sh

License

MIT

Dependencies

~1–1.7MB
~31K SLoC