Skip to main content

truce_core/
lib.rs

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