sim_lib_plugin_lv2/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! LV2-shaped plugin adapters for SIM audio graph processors.
4//!
5//! The default `model` feature is a pure-Rust, in-process model of the LV2
6//! plugin format. The crate carries no `-sys` or FFI dependency:
7//! [`Lv2HostProcessor`] runs SIM audio-graph processors shaped to the LV2
8//! descriptor, and `export_*_as_lv2` produces descriptors. On Linux, the
9//! optional `lv2-host` feature exposes a provider trait and fixture host
10//! provider for capability-gated fallback loading.
11//!
12//! ```rust
13//! use sim_lib_plugin_lv2::lv2_gain_lv2_descriptor;
14//!
15//! let lv2 = lv2_gain_lv2_descriptor().unwrap();
16//! assert_eq!(lv2.ports.len(), 3);
17//!
18//! let descriptor = lv2.to_plugin_descriptor().unwrap();
19//! assert_eq!(descriptor.id.format.as_str(), "lv2");
20//! ```
21
22mod adapter;
23mod descriptor;
24#[cfg(all(feature = "lv2-host", target_os = "linux"))]
25pub mod native;
26mod runtime;
27mod state;
28
29pub use adapter::{
30 Lv2ExportedProcessor, Lv2HostProcessor, export_gain_as_lv2, export_processor_as_lv2,
31};
32pub use descriptor::{
33 Lv2PluginDescriptor, Lv2Port, Lv2PortKind, lv2_gain_descriptor, lv2_gain_lv2_descriptor,
34};
35pub use runtime::{install_lv2_plugin_lib, lv2_plugin_symbols};
36pub use state::Lv2StatePatch;
37
38#[cfg(test)]
39mod tests;