truce_rack/lib.rs
1//! Cross-format audio plugin host.
2//!
3//! `truce-rack` is the umbrella crate. It re-exports the
4//! per-format wrapper crates behind features so a downstream user
5//! can opt into exactly the formats they need without juggling
6//! version pins across multiple direct dependencies.
7//!
8//! # Default features
9//!
10//! `clap` + `vst3` — the two cross-platform mainstream plugin
11//! formats. CLAP is pure-Rust, VST3 uses the community `vst3`
12//! crate (no Steinberg SDK submodule).
13//!
14//! # Opt-in features
15//!
16//! - `au` — Audio Unit v2 host (Apple platforms only)
17//! - `au3` — Audio Unit v3 (App Extension) host (Apple platforms only)
18//! - `lv2` — LV2 host via `lilv-sys` (requires the system `lilv` library)
19//!
20//! # Layout
21//!
22//! Format wrappers are re-exported as nested modules so existing
23//! `truce_rack_clap::*` paths can also be reached as
24//! `truce_rack::clap::*`:
25//!
26//! ```ignore
27//! use truce_rack::core::scanner::PluginScanner;
28//! use truce_rack::clap::ClapScanner;
29//!
30//! let plugins = ClapScanner::new().scan()?;
31//! ```
32//!
33//! For per-format granular dependency management, depend on the
34//! individual `truce-rack-*` crates directly instead.
35
36#![doc(html_root_url = "https://docs.rs/truce-rack/1.0.1")]
37// Empty `cargo doc` build with no features enabled would emit
38// dead-imports lints; suppress them at the crate level so the
39// no-feature `cargo check` stays clean.
40#![allow(unused_imports)]
41
42/// Format-agnostic traits and types — `Plugin`, `PluginScanner`,
43/// `PluginEditor`, the `EventList` / `MidiData` enums, and shared
44/// error / info structs. Always available regardless of features.
45pub use truce_rack_core as core;
46
47/// CLAP host. Enabled by default; disable with `default-features = false`.
48#[cfg(feature = "clap")]
49pub use truce_rack_clap as clap;
50
51/// VST3 host. Enabled by default; disable with `default-features = false`.
52#[cfg(feature = "vst3")]
53pub use truce_rack_vst3 as vst3;
54
55/// Audio Unit v2 host (Apple platforms). Enable with the `au` feature.
56#[cfg(all(feature = "au", target_vendor = "apple"))]
57pub use truce_rack_au as au;
58
59/// Audio Unit v3 (App Extension) host (Apple platforms).
60/// Enable with the `au3` feature.
61#[cfg(all(feature = "au3", target_vendor = "apple"))]
62pub use truce_rack_au3 as au3;
63
64/// LV2 host (requires the system `lilv-0` library).
65/// Enable with the `lv2` feature.
66#[cfg(feature = "lv2")]
67pub use truce_rack_lv2 as lv2;