rustify-licensing
Framework-agnostic in-app licensing for native Rust desktop apps: validate a key, node-lock the machine, cache the result, and stay unlocked through a bounded offline grace window — failing closed on an authoritative denial.
Part of the rustify platform for shipping monetized native Rust apps.
What it does
- Validate + activate a license key against Keygen, node-locking this machine via a persisted fingerprint.
- Offline grace — stay unlocked N days off the last successful online check, but fail
closed on an explicit denial. (The
DeniedvsOfflinesplit is the load-bearing safety property: a wrong-account or revoked key must not ride grace.) - Runtime unlock — one build runs locked (free/demo) until a license validates, then unlocks features at runtime. No separate demo binary, no recompile.
Adapters
worker— a framework-agnostic threadedLicenseWorkerfor egui / Slint / any immediate-mode GUI or CLI (no framework dependency).bevy(feature) — aLicensingPluginwith resources + a message API.headless— a blockingcheck_blockingfor CLIs and tests.
The backend is behind a LicenseProvider trait (Keygen today).
Quickstart (egui / any UI loop)
use ;
let config = LicenseConfig ;
let mut license = keygen; // loads state + starts a check
// each frame: license.poll();
// gate features on license.unlocked();
// bind a field to license.key_mut() and call license.activate() on a button.
License
Licensed under either of Apache-2.0 or MIT at your option.