mod safe_types;
mod traits;
mod canary;
#[cfg(feature = "shell")]
mod loader;
#[cfg(feature = "shell")]
pub mod shell;
pub mod static_shell;
pub use safe_types::*;
pub use traits::*;
pub use canary::{AbiCanary, ProbePlugin, verify_probe};
#[cfg(feature = "shell")]
pub use loader::NativeLoader;
#[macro_export]
macro_rules! export_plugin {
($ty:ty) => {
#[no_mangle]
pub fn truce_create() -> Box<dyn $crate::PluginLogic> {
Box::new(<$ty as $crate::PluginLogic>::new())
}
#[no_mangle]
pub fn truce_abi_canary() -> $crate::AbiCanary {
$crate::AbiCanary::current()
}
#[no_mangle]
pub fn truce_vtable_probe() -> Box<dyn $crate::PluginLogic> {
Box::new($crate::ProbePlugin)
}
};
}
pub mod prelude {
pub use crate::safe_types::*;
pub use crate::traits::*;
pub use crate::canary::{AbiCanary, ProbePlugin};
pub use truce_gui::layout::{PluginLayout, KnobRow, KnobDef, WidgetKind};
pub use truce_params::{Params, FloatParam, BoolParam, IntParam, EnumParam, ParamEnum};
pub use truce_params::{Smoother, SmoothingStyle};
pub use truce_core::util::{db_to_linear, linear_to_db, midi_note_to_freq};
}