RustZK
A pure Rust implementation of the ZK attendance device protocol.
📦 Installation
Add rustzk to your Cargo.toml.
From GitHub
[dependencies]
rustzk = { git = "https://github.com/vkaylee/rustzk" }
Local Path (for development within workspace)
[dependencies]
rustzk = { path = "../rustzk" }
🚀 Usage Example
use rustzk::ZK;
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut zk = ZK::new("192.168.1.201", 4370);
zk.connect(true)?;
let users = zk.get_users()?;
println!("Found {} users", users.len());
let logs = zk.get_attendance()?;
println!("Found {} attendance records", logs.len());
zk.disconnect()?;
Ok(())
}
📜 License
MIT