rustify-licensing 0.1.0

Framework-agnostic in-app licensing (validate / machine-activate / offline-grace) for native Rust apps. Keygen provider + Bevy / egui / headless adapters.
Documentation
//! The pluggable licensing backend. Keygen today; the trait keeps Polar (MoR +
//! licensing in one) or an offline Ed25519-signed-key verifier a later drop-in without
//! touching the core engine.

use crate::core::error::CheckErr;

/// A licensing backend. Owns the provider-specific validate / activate / node-lock
/// dance and returns a definitive verdict (`Ok(valid)`) or a [`CheckErr`] distinguishing
/// an authoritative denial (lock) from a transient connectivity failure (offline grace).
///
/// `Send + Sync` so an adapter can hand it to a background task / thread pool.
pub trait LicenseProvider: Send + Sync {
    /// Check `key` for this machine `fingerprint`. `progress` receives human-readable
    /// step messages (e.g. "validating license…", "activating this device…").
    fn check(
        &self,
        key: &str,
        fingerprint: &str,
        progress: &mut dyn FnMut(String),
    ) -> Result<bool, CheckErr>;
}

pub mod keygen;
pub use keygen::KeygenProvider;