oxo-license 0.1.1

Generic dual-license runtime verification library for Traitome projects
Documentation

oxo-dual-licenser

CI Crates.io Docs.rs License: MIT

Generic dual-license runtime verification library for Traitome Rust projects.

oxo-dual-licenser extracts and generalizes the license system from the oxo-call project into a reusable library and CLI tool.

Features

  • Ed25519 signatures — Cryptographically secure license verification
  • Offline verification — No network calls at runtime
  • Flexible license types — academic, commercial, enterprise, or custom
  • Configurable discovery — CLI args, env vars, or platform config dirs
  • oxo-call compatible — Can issue and verify oxo-call licenses

Workspace Crates

Crate Description
oxo-license Embeddable Ed25519 license verification library
oxo-license-issuer CLI tool for generating key pairs and issuing licenses

Quick Start

Library usage

[dependencies]
oxo-license = "0.1"
use oxo_license::{LicenseConfig, load_and_verify};

static LICENSE_CONFIG: LicenseConfig = LicenseConfig {
    schema_version: "my-app-license-v1",
    public_key_base64: "YOUR_BASE64_PUBLIC_KEY",
    license_env_var: "MY_APP_LICENSE",
    app_qualifier: "io",
    app_org: "myorg",
    app_name: "my-app",
    license_filename: "license.json",
};

fn main() {
    load_and_verify(None, &LICENSE_CONFIG).expect("valid license required");
}

CLI tool

# Install
cargo install oxo-license-issuer

# Generate a key pair
oxo-license-issuer generate-keypair --output keys.txt

# Issue a license
export OXO_LICENSE_PRIVATE_KEY="<seed>"
oxo-license-issuer issue \
  --schema my-app-license-v1 \
  --org "Acme University" \
  --type academic \
  --output license.json

# Verify a license
oxo-license-issuer verify \
  --public-key "<pubkey>" \
  --schema my-app-license-v1 \
  license.json

Helper script

# Issue license with the helper script
./issue-license.sh "Acme University" "research@acme.edu" academic license.json

oxo-call Compatibility

This library can fully replace the license module in oxo-call:

use oxo_license::LicenseConfig;

pub static OXO_CALL_CONFIG: LicenseConfig = LicenseConfig {
    schema_version: "oxo-call-license-v1",
    public_key_base64: "SOTbyPWS8fSF+XS9dqEg9cFyag0wPO/YMA5LhI4PXw4=",
    license_env_var: "OXO_CALL_LICENSE",
    app_qualifier: "io",
    app_org: "traitome",
    app_name: "oxo-call",
    license_filename: "license.oxo.json",
};

Issue licenses for oxo-call

# Using the script
./issue-license.sh "Customer Name" "customer@example.com" academic license.oxo.json

# Or using CLI directly
oxo-license-issuer issue \
  --schema oxo-call-license-v1 \
  --org "Customer Name" \
  --type commercial \
  --output license.oxo.json

Documentation

Full documentation is available at GitHub Pages.

License

This project is available under:

Citation

If you use this software in academic work, please cite using CITATION.cff.