tauri-plugin-keylight
Tauri v2 plugin for the Keylight licensing SDK — activate and validate license keys and gate features on entitlements from a Tauri desktop app.
This crate is the Rust side of the plugin; the matching JavaScript/TypeScript bindings are
published as tauri-plugin-keylight-api.
Install
Rust (src-tauri/Cargo.toml):
[]
= { = "https://github.com/keylight-dev/keylight-rust" }
JavaScript:
Register the plugin
// src-tauri/src/main.rs
use KeylightConfig;
Permissions
Add the plugin's default permission set to your capability file:
// src-tauri/capabilities/default.json
keylight:default allows activate, validate, and has_entitlement. You can also grant the
per-command permissions individually (keylight:allow-activate, keylight:allow-validate,
keylight:allow-has-entitlement).
Use from the frontend
import { activate, validate, hasEntitlement } from 'tauri-plugin-keylight-api';
await activate('USER-LICENSE-KEY');
const ok = await validate();
if (await hasEntitlement('pro')) {
// unlock pro features
}
License
MIT