sim_lib_plugin_clap/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! Modeled CLAP-shaped plugin adapters for SIM audio graph processors.
4//!
5//! The default `model` feature is a pure-Rust, in-process model of the CLAP
6//! plugin format. The crate carries no `-sys` or FFI dependency:
7//! [`ClapHostProcessor`] runs SIM audio-graph processors shaped to the CLAP
8//! descriptor, and `export_*_as_clap` produces descriptors, not native binaries.
9//! The optional `clap-host` feature exposes a provider trait and fixture host
10//! provider for capability-gated fallback loading without adding an SDK binding.
11//!
12//! ```rust
13//! use sim_lib_plugin_clap::clap_gain_descriptor;
14//!
15//! let descriptor = clap_gain_descriptor().unwrap();
16//! assert_eq!(descriptor.id.format.as_str(), "clap");
17//! assert_eq!(descriptor.parameter(0).unwrap().stable_id.as_str(), "gain");
18//! ```
19
20mod adapter;
21mod descriptor;
22mod event;
23#[cfg(feature = "clap-host")]
24pub mod native;
25mod runtime;
26
27pub use adapter::{
28 ClapExportedProcessor, ClapHostProcessor, export_gain_as_clap, export_processor_as_clap,
29};
30pub use descriptor::{clap_audio_effect_descriptor, clap_gain_descriptor, clap_synth_descriptor};
31pub use event::{ClapEvent, ClapEventBuffer, ClapParamMap};
32pub use runtime::{ClapPluginLib, clap_plugin_symbols, install_clap_plugin_lib};
33
34#[cfg(test)]
35mod tests;