Rust SDK (seatling)
The seatling crate is the authoritative Rust core engine for the Zero-Prompt Ed25519 Hybrid Hardware Anchor Architecture. It provides sub-microsecond lock-free authorization reads (ArcSwap) and zero-prompt hardware-sealed keystores for Tauri desktop apps, game engines, and native Rust binaries.
Cargo.toml
Section titled “Cargo.toml”[dependencies]seatling = "2.0"Complete Integration Example
Section titled “Complete Integration Example”use seatling::{SeatlingClient, SeatlingConfig, StatusCode};use std::collections::HashMap;
fn main() -> Result<(), Box<dyn std::error::Error>> { let config = SeatlingConfig { workspace_id: "ws_01j8k9m0n1p2q3r4s5t6u7v8w9".to_string(), product_id: "prod_rust_studio".to_string(), public_keys: HashMap::from([( "prod_key_2026_v1".to_string(), "6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=".to_string(), )]), app_version: "1.2.0".to_string(), api_base_url: "https://api.seatling.app".to_string(), heartbeat_interval_seconds: 14400, storage_dir: None, };
// 1. Initialize client and evaluate local hardware-sealed lease (< 1ms, 0 network I/O) let client = SeatlingClient::init(config)?; println!("Offline Lease Status: {}", client.status().as_str());
// 2. Activate online if not yet authorized locally if !client.is_authorized() { let res = client.activate("SEAT-8F92-4B11-90E1"); if !res.success { if matches!( res.status, StatusCode::SeatsExhausted | StatusCode::RequiresPortalDeactivation ) { if let Some(url) = res.portal_url { eprintln!("Seat limit reached. Transfer a seat at: {}", url); } } else { eprintln!("Activation failed ({}): {}", res.status.as_str(), res.message); } return Ok(()); } println!("✓ Seat activated: {:?}", res.seat_id); }
// 3. Sub-microsecond lock-free hot-path check (< 0.01ms) if client.is_authorized() { let pro_enabled = client.get_entitlement_bool("pro_features", false); let max_threads = client.get_entitlement_i64("max_threads", 8); println!( "✓ Application authorized! pro_features={}, max_threads={}", pro_enabled, max_threads ); }
// 4. Clean shutdown of background heartbeat worker on exit client.shutdown(); Ok(())}Privacy & GDPR Best Practices
Section titled “Privacy & GDPR Best Practices”- Built-In Data Minimization (
Art. 5(1)(c)&Art. 25(2)): Theseatlingcrate never collects OS hostnames, OS usernames, or MAC addresses—only coarseos,os_version,app_version, and domain-scoped, license-keyedHKDF-SHA256pseudonymized hardware hashes (Art. 4(5)GDPR). - Zero-PII Logging (
Art. 32): Never print raw license keys or full buyer emails totracingspans, stdout, or crash logs; log only opaqueseat_idvalues andStatusCoderesults. - End-User Disclosures (
Art. 13): Review Privacy & GDPR Compliance for accurate Privacy Policy wording and in-app deactivation (client.deactivate()) guidance.