truce_rack_core/lib.rs
1//! Host-side core for the rack audio-plugin framework.
2//!
3//! `truce-rack-core` defines the contracts every format wrapper
4//! (`truce-rack-clap`, `truce-rack-vst3`, `truce-rack-au`, …) implements: the
5//! [`Plugin`] trait, the [`AudioBuffer`] / [`EventList`] /
6//! [`ProcessContext`] passed into `process`, the [`BusLayout`]
7//! that declares bus topology, and the FFI-edge `catch_unwind`
8//! helpers in [`wrapper`].
9//!
10//! No FFI lives here. The crate compiles on every platform with
11//! no system dependencies — a consumer that depends on `truce-rack-core`
12//! and on a single format wrapper picks up exactly that format's
13//! transitive deps.
14//!
15//! # Mapping from truce
16//!
17//! `truce-rack-core` mirrors `truce-core` on the host side. The names
18//! parallel deliberately:
19//!
20//! | truce (plugin) | rack (host) |
21//! | --- | --- |
22//! | `PluginLogic` | [`Plugin`] |
23//! | `PluginExport` | [`PluginScanner`] |
24//! | `AudioBuffer` | [`AudioBuffer`] |
25//! | `EventList` | [`EventList`] |
26//! | `ProcessContext` | [`ProcessContext`] |
27//! | `BusLayout` | [`BusLayout`] |
28//! | `PluginInfo` | [`PluginInfo`] |
29//! | `wrapper::run_*` | [`wrapper`]`::run_*` |
30//!
31//! A host targeting one format depends on `truce-rack-core` plus that
32//! format's wrapper crate; a multi-format host depends on
33//! `truce-rack-core` plus each wrapper it needs.
34
35#![warn(missing_docs)]
36
37pub mod buffer;
38pub mod bus;
39pub mod editor;
40pub mod error;
41pub mod events;
42pub mod info;
43pub mod plugin;
44pub mod sample;
45pub mod scanner;
46pub mod state;
47pub mod transport;
48pub mod wrapper;
49
50pub use buffer::AudioBuffer;
51pub use bus::{BusKind, BusLayout, ChannelConfig};
52pub use editor::{PluginEditor, WindowHandle};
53pub use error::{Error, Result};
54pub use events::{Event, EventBody, EventList, MidiData};
55pub use info::{ParameterInfo, PluginCategory, PluginInfo, PresetInfo};
56pub use plugin::{Plugin, PluginCore, ProcessContext, ProcessStatus};
57pub use sample::Sample;
58pub use scanner::PluginScanner;
59pub use state::{StateEnvelope, StateLoadError};
60pub use transport::TransportInfo;