Skip to main content

truce_core/
lib.rs

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