Skip to main content

Crate truce_rack_clap

Crate truce_rack_clap 

Source
Expand description

CLAP host implementation for the truce-rack framework.

CLAP is the simplest format to host because the entire API is pure C with no platform-specific oddities. truce-rack-clap uses clap-sys for raw bindings and libloading to open plugin bundles at runtime — no C++ glue is involved.

§Lifecycle

Each .clap bundle ships a single clap_entry symbol. The scanner opens the bundle, calls entry.init(path), asks the factory at CLAP_PLUGIN_FACTORY_ID to enumerate its plugins, converts each clap_plugin_descriptor into a PluginInfo and then calls entry.deinit() to release scanner-only state.

ClapScanner::load re-opens the bundle, holds the entry + library alive for the lifetime of the returned ClapPlugin, and on Drop calls the plugin’s destroy followed by the entry’s deinit.

Structs§

ClapPlugin
One loaded CLAP plugin instance.
ClapScanner
CLAP scanner.

Constants§

CLAP_EXTENSION
Filename extension every CLAP plugin uses, including the leading dot.
FORMAT
Format identifier — used as the format field on PluginInfo entries this crate returns.

Functions§

default_clap_paths
Standard locations the CLAP spec lists for each OS. Mirrors what the CLAP example host walks.