C++17 / JUCE (seatling.hpp)
Audio software (VST3, AU, AAX) and real-time graphics engines have strict real-time constraints:
- License validation must never block the audio thread.
- Network calls or mutex locks inside DSP loops cause buffer underruns, stutter, and audible pops.
- Musicians frequently run audio workstations disconnected from the internet.
Seatling provides a header-only C++17 RAII wrapper (#include <seatling/seatling.hpp>) backed by the statically linked Rust core (libseatling.a / seatling.lib), guaranteeing sub-microsecond lock-free reads (< 0.01ms, noexcept) on the audio thread.
CMake Integration
Section titled “CMake Integration”# Link the compiled Seatling static library and include headerstarget_include_directories(MyAudioPlugin PRIVATE /path/to/seatling/include)target_link_libraries(MyAudioPlugin PRIVATE seatling)Audio Plugin Lifecycle Example
Section titled “Audio Plugin Lifecycle Example”#include <seatling/seatling.hpp>#include <iostream>
class SynthAudioProcessor {private: seatling::SeatlingClient licensingClient;
static seatling::SeatlingConfig makeConfig() { seatling::SeatlingConfig cfg; cfg.workspace_id = "ws_01j8k9m0n1p2q3r4s5t6u7v8w9"; cfg.product_id = "prod_synth_pro"; cfg.public_keys["prod_synth_pro_2026_v1"] = "u8A_wX09G7V8B3_N8Q4E5F6G7H8I9J0K1L2M3N4O5P6"; cfg.app_version = "1.0.0"; return cfg; }
public: SynthAudioProcessor() : licensingClient(makeConfig()) { // 1. Fast local cryptographic check on plugin init (< 1ms, 0ms network I/O) auto status = licensingClient.initialize(); if (licensingClient.is_authorized()) { std::cout << "✓ DSP Audio Engine unlocked via local hardware-sealed lease" << std::endl; } else { std::cout << "Plugin in evaluation mode (" << seatling::status_to_string(status) << ")" << std::endl; } }
void processBlock(AudioBuffer<float>& buffer) noexcept { // 2. Lock-free atomic read (< 0.01ms, noexcept, zero allocations) if (!licensingClient.is_authorized()) { buffer.clear(); return; }
const int64_t maxVoices = licensingClient.get_entitlement_i64("max_voices", 16); renderAudio(buffer, maxVoices); }
bool handleOnlineActivation(const std::string& licenseKey) { // 3. Online activation triggered from the UI thread if (licensingClient.activate(licenseKey)) { return true; }
auto st = licensingClient.status(); if (st == seatling::StatusCode::SeatsExhausted || st == seatling::StatusCode::RequiresPortalDeactivation) { std::cerr << "Seat limit reached. Manage active devices at https://portal.seatling.app" << std::endl; } return false; }};Privacy & GDPR Best Practices
Section titled “Privacy & GDPR Best Practices”- Built-In Data Minimization (
Art. 5(1)(c)&Art. 25(2)):seatling.hppnever collects OS hostnames, OS usernames, or MAC addresses—only coarseos,os_version,app_version, and domain-scoped, license-keyedHKDF-SHA256pseudonymized hardware hashes (Art. 4(5)GDPR). - Zero-PII Logging (
Art. 32): Never log raw license keys or full buyer emails in plugin diagnostic logs; log onlyseatling::status_to_string(...)results. - End-User Disclosures (
Art. 13): Review Privacy & GDPR Compliance for accurate Privacy Policy wording and in-app deactivation (licensingClient.deactivate()) guidance.