Skip to main content

truce_core/
lib.rs

1pub mod audio_tap;
2pub mod buffer;
3pub mod bus;
4pub mod chunked_process;
5pub mod config;
6pub mod custom_state;
7pub mod denormal;
8pub mod dsp_state;
9pub mod editor;
10pub mod events;
11pub mod export;
12pub mod info;
13pub mod meters;
14pub mod midi;
15pub mod plugin;
16pub mod presets;
17pub mod process;
18pub mod rt;
19pub mod screenshot;
20pub mod snapshot;
21pub mod state;
22pub mod tasks;
23pub mod transport;
24pub mod ump;
25pub mod util;
26pub mod wrapper;
27
28pub use buffer::{AudioBuffer, RawBufferScratch};
29pub use bus::{BusConfig, BusKind, BusLayout, ChannelConfig};
30pub use config::{AudioConfig, ProcessMode};
31pub use dsp_state::{NO_PRESERVE, layout_fingerprint};
32pub use editor::{Editor, EditorBuilder, IntoEditor, PluginContext};
33pub use events::{Event, EventBody, EventList, PushError, SYSEX_POOL_PREALLOC, TransportInfo};
34pub use export::PluginExport;
35pub use info::{AutomationConfig, MidiDialect, PluginCategory, PluginInfo};
36pub use meters::MeterStore;
37pub use plugin::PluginRuntime;
38pub use process::{ProcessContext, ProcessStatus};
39pub use rt::{RtSection, allow_alloc};
40pub use snapshot::SnapshotSlot;
41
42#[cfg(feature = "rt-paranoid")]
43pub use rt::RtCheckAlloc;
44pub use transport::TransportSlot;
45
46// `Float` / `Sample` live in `truce-params` (truce-core depends on
47// truce-params, not the other way around). Re-exported here so
48// `truce_core::Float` / `truce_core::sample::Sample` are valid paths
49// for callers that don't want to depend on truce-params directly.
50pub use truce_params::sample;
51pub use truce_params::sample::{Float, Sample};
52pub use util::{db_to_linear, linear_to_db, meter_display, midi_note_to_freq};
53
54// `cast`, `shell_sidecar`, and `slugify` are hosted in `truce-utils`
55// (a dependency-free crate) so build-time consumers like `cargo-truce`
56// can use them without inheriting `truce-core`'s `truce-params` + `png`
57// publish chain. Re-exported here under `truce_core::cast::*` etc.
58// for callers that already depend on truce-core.
59pub use truce_utils::{cast, shell_sidecar, slugify};