Foliox License Docs

Rust SDK

Drop-in source files for Rust — copy them into your project. Nothing to install from a package registry.

use license_client::LicenseClient;

let client = LicenseClient::new(
    "https://license.foliox.sbs",
    "YOUR_PRODUCT_ID",                       // shown on the product's page in your dashboard
    "PASTE_PUBLIC_KEY_FROM_THE_DOCS",        // public - not a secret
)?;                                          // unsafe or malformed configuration is an Err here

let result = client.check(license_key);
if result.valid {
    println!("licensed, status: {:?}, expires: {:?}", result.status, result.expires_at);
} else {
    println!("not licensed: {:?}", result.reason);
}

Copy src/lib.rs (and the dependencies from Cargo.toml) into your own crate, or run cargo run --example basic -- <key> here.

Tuning: LicenseClient::with_options(base_url, product, public_key, ClientOptions { timeout, max_retries, backoff_base, backoff_cap, total_deadline, max_response_age, cache_path, hwid, allow_insecure_loopback, ..Default::default() }). Also verify (never activates), clear_cache, is_valid_key_format, compute_hwid.

What it does for you

Offline grace is a resilience feature, not a security boundary. See the SDKs & API wrapper page in your server's docs for the full list, what no client library can do, and upgrade notes from v1.