Rust SDK

Rust license key system

A typed client for Rust: verify a key at startup, get a structured result with an explicit reason, and keep your binary honest.

License checking in a few lines

let client = LicenseClient::new(
    "https://license.foliox.sbs",
    "my-tool",
    PUBLIC_KEY, // from /api/v1/public-key
)?;

// activates on first run, verifies on every run after
let result = client.check(license_key);
if !result.valid {
    eprintln!("not licensed: {:?}", result.reason);
    std::process::exit(1);
}

Get started

  1. Create a free account, add a product, and generate a key.
  2. Get the Rust client and its full guide: Rust SDK docs.
  3. Copy the public key from /api/v1/public-key into your app — the SDK uses it to verify every answer.
  4. Call check() with the customer’s key as shown above.

Why this SDK

  • Typed results with an explicit reason instead of stringly-typed errors.
  • Suits CLI tools, games and desktop apps shipped as native binaries.
  • Signatures are standard Ed25519, so any Rust crypto crate can verify them.

Prefer plain HTTP? See the licensing API and the API reference. Device locking works through a hashed machine ID — here’s how.

FAQ

Rust licensing questions

How do I add license keys to a Rust app?

Copy the Rust client file into your project, create a product in your dashboard, generate keys, and call check() with the customer’s key when your app starts. The SDK activates the key on first run and verifies it after that.

What happens when the customer is offline?

The client caches the last signed “valid” answer and keeps your app running for up to 72 hours. Because the cache is signed, it can’t be edited by hand.

Is the SDK free?

Yes — all SDKs are included on every plan, including Free.

Ready to license your software?

Create a free account, generate your first keys and drop in an SDK — it takes a few minutes.