sim_lib_plugin_vst3/lib.rs
1#![forbid(unsafe_code)]
2#![deny(missing_docs)]
3//! VST3-shaped plugin export adapters for SIM audio graph processors.
4//!
5//! Modeled tier, no native hosting. This crate is a pure-Rust, in-process MODEL
6//! of the VST3 plugin format: the workspace forbids `unsafe` and the crate
7//! carries no `-sys`/FFI dependency, so `export_*_as_vst3` produces descriptors,
8//! not native `.vst3` binaries, and no plugin loading occurs. Native export and
9//! hosting are deferred; `current_vst3_scope` names the blockers and SDK
10//! requirements. The modeled tier is flagged by the default-on `model` feature.
11//!
12//! ```rust
13//! use sim_lib_plugin_vst3::vst3_gain_vst3_descriptor;
14//!
15//! let vst3 = vst3_gain_vst3_descriptor().unwrap();
16//! assert_eq!(vst3.buses.len(), 3);
17//!
18//! let descriptor = vst3.to_plugin_descriptor().unwrap();
19//! assert_eq!(descriptor.id.format.as_str(), "vst3");
20//! ```
21
22mod adapter;
23pub mod cookbook;
24mod descriptor;
25mod event;
26mod runtime;
27mod scope;
28
29pub use adapter::{Vst3ExportedProcessor, export_gain_as_vst3, export_processor_as_vst3};
30pub use cookbook::vst3_gain_demo;
31pub use descriptor::{
32 Vst3Bus, Vst3BusKind, Vst3ParamInfo, Vst3PluginDescriptor, vst3_gain_descriptor,
33 vst3_gain_vst3_descriptor,
34};
35pub use event::{Vst3Event, Vst3EventBuffer, Vst3ParamMap};
36pub use runtime::{Vst3PluginLib, install_vst3_plugin_lib, vst3_plugin_symbols};
37pub use scope::{Vst3HostingDecision, Vst3ScopeDecision, current_vst3_scope};
38
39/// Cookbook recipes for this lib, embedded at build time.
40pub static RECIPES: sim_cookbook::EmbeddedDir =
41 include!(concat!(env!("OUT_DIR"), "/cookbook_recipes.rs"));
42
43#[cfg(test)]
44mod tests;